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
```
* Added 'file_name_no_space' rule
* Removed unused var, and added to changelog
* Remove custom suffix from 'file-name-no-space' rule
* Fixed LinuxMain
* Switched to use a CharacterSet over Regex
* [UnusedImportRule] Handle comments after the import statement
* fixup! [UnusedImportRule] Handle comments after the import statement
* Use \s+ to capture whitespace in regex
Co-Authored-By: Dave Lee <davelee.com@gmail.com>
* Fix testDetectSwiftVersion() with Swift 5.1.3
* fixup! Fix testDetectSwiftVersion() with Swift 5.1.3
* Handle @_exported imports
* Work around SR-11099
* Unescape newline
* 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
* Add expiring todos rule
* Fix default dateFormat
* Fix date regex to handle 2-4 at beginning/end of string
* Clean up/improve clarity
* Add tests for ExpiringTodoRule
* Add output from make sourcery
* Add output from make sourcery
* Update documentation
* Enable updating of all configuration properties
* Add back Foundation import
* Add changelog entry
* Add 2 spaces after changelog entry
* Add return for legacy swift compatibility
* Add unwrapping to switch statement
* Use disable:next
* Add default values to severity config init; Add public delimiter init
* Add tests for various custom configurations
* Remove unused funcs
* Add extra tests to LinuxMain file
* Update File type -> SwiftLintFile
* Move Changelog entry
* Shorten changelog entry line length
* Fix changelog
* 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