The following was triggering:
```swift
func printBoolOrTrue(_ expression: @autoclosure () throws -> Bool?) rethrows {
try print(expression() ?? true)
}
```
Fix by adding the `rethrows` attribute kind to the rule's blacklist.
* Add Example wrapper in order to display test failures inline when running in Xcode.
* Stop using Swift 5.1-only features so we can compile on Xcode 10.2.
* Wrap strings in Example.
* Add Changelog entry.
* Wrap all examples in Example struct.
* Better and more complete capturing of line numbers.
* Fix broken test.
* Better test traceability.
* Address or disable linting warnings.
* Add documentation comments.
* Disable linter for a few cases.
* Limit mutability and add copy-and-mutate utility functions.
* Limit scope of mutability.
Add `deinitializer` type content to `type_contents_order` rule instead of grouping it with initializers. This allows the common use case of putting the deinitializer at the end of the class.
Catch previously missed violations in the `optional_enum_case_matching` rule when case expressions involved tuples. For example:
```swift
switch foo {
case (.bar↓?, .baz↓?): break
case (.bar↓?, _): break
case (_, .bar↓?): break
default: break
}
```
This option allows for more fine-grained placement of the location
marker for code violating a custom rule, e.g.:
```swift
print("Hello world.")
^~~~~
```
for this `.swiftlint.yml`:
```yaml
custom_rules:
world_preceded_by_hello:
name: "World Preceded by Hello"
included: ".+\\.swift"
message: "The word World predeced by the word hello should be capitalised."
severity: warning
regex: "(?i:hello)\\s+(world)"
match_kinds: [string]
capture_group: 1
```
* Fixed false positive in opening_brace rule on anonymous closure
* added one more triggering rule, fixed docs
* fixed anonymous closure match
* fixed anonymous closure match, more accurate
* Improve compilation time
Before this change, `trailingClosure` took 8.6s to type check.
After this change, it takes 31ms.
* Speed up type checking `isDecimal(number:)`
Before: 377ms
After: 2ms
* Speed up type checking testViolationMessageForExpressibleByIntegerLiteral()
Before: 285ms
After: 175ms
* Fix OSSCheck
More than just rules are in `Source/SwiftLintFramework/Rules/`
* Shim XCTUnwrap for Swift 5.0