Commit Graph

10 Commits

Author SHA1 Message Date
Marcelo Fabri f8d505a225
Add example for #3945 (#4469)
Fixes #3945
2022-10-24 09:23:37 +00:00
JP Simard 027bdcdc95
Fix crash when parsing multi-line attributes with the `attributes` rule (#3776)
Fixes #3761
2021-12-06 16:08:53 +00:00
JP Simard 2dcce6b184
[AttributesRule] Fix parameterized attributes (#3405)
Some attributes are parameterized, such as `@objc(name)`. Previously
these reported `attributes` violations because their contents weren't
included in the configuration, which would just have `@objc`.
2020-11-07 16:57:57 -05:00
JP Simard 6d2e8cfc06
Skip correcting files with parser diagnostics (#3349)
* Skip correcting files with parser diagnostics

Also fix many rule examples with parser diagnostics.

* Sourcery

* Link to issue in changelog entry
2020-09-17 18:14:00 -04:00
Mateusz Matrejek 8ed7c31161
Fix false positive in with Swift 5.2 (#3112) (#3206) 2020-05-27 22:13:46 +03:00
JP Simard 85d3425210
Fix attributes rule false positive with Swift 5.2 (#3154)
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.
2020-03-27 09:33:12 -07:00
Marcelo Fabri a2fe35d620 Fix false positive in `attributes` with Swift 5.2 (#3097)
Fixes #3079
2020-02-09 18:17:45 -08:00
Zev Eisenberg fcf848608e
Add Inline test failure messages (#3040)
* 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.
2020-02-02 10:35:37 +02:00
JP Simard 0e862ca9c4
Enable vertical whitespace rules in SwiftLint
and fix violations
2018-12-02 14:01:23 -08:00
JP Simard 3961d6482b
Organize rules by kind in Xcode project (#2341) 2018-08-05 18:54:05 -07:00