17 Commits

Author SHA1 Message Date
Marcelo Fabri f8ef7d649c Enable legacy_multiple and prefer_self_type_over_type_of_self in our codebase 2020-08-05 01:11:17 -07: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 fe5baca7cd Migrate to use SourceKitten's new ByteCount/ByteRange types (#3037)
New APIs were introduced in SourceKitten to allow for a more typesafe distinction between integers meaning NSString-based distances and byte-based distances.

* https://github.com/jpsim/SourceKitten/pull/639
* https://github.com/jpsim/SourceKitten/pull/642

This PR migrates SwiftLint's use of those APIs.
2020-01-16 15:18:37 -08:00
JP Simard 40ade98710 Update SourceKitten to 0.28.0 (#3011) 2020-01-03 16:47:18 -08:00
Paul Taykalo ac40778cb3 Use SwiftLintFile wrapper over the File 2019-11-07 15:19:17 +02:00
Paul Taykalo 8c963d2c15 Working solution with SouceKittenDictionary wrapper 2019-11-07 08:50:50 +02:00
Dalton Claybrook b20424426c Add updates based on PR feedback 2018-09-10 23:45:56 -04:00
Dalton Claybrook 9f74749473 Add shared non-triggering examples to the tests 2018-09-10 23:45:56 -04:00
Dalton Claybrook 74f7c1481d Update collection alignment rule name 2018-09-10 23:45:56 -04:00
Dalton Claybrook dfa92dc07d Add bridge to NSString to fix linux issue 2018-09-10 23:45:56 -04:00
Dalton Claybrook 81746c6507 Make collection alignment rule opt-in 2018-09-10 23:45:56 -04:00
Dalton Claybrook 4e27bf9f87 Collection alignment rule is no longer an automatic testable 2018-09-10 23:45:56 -04:00
Dalton Claybrook a71bb4dd48 Add more triggering and non-triggering examples 2018-09-10 23:45:56 -04:00
Dalton Claybrook 0597df5b8c Add support for colon alignment 2018-09-10 23:45:56 -04:00
Dalton Claybrook 31995f916f Clean up collection alignment rule to mimic other alignment rules 2018-09-10 23:45:56 -04:00
Dalton Claybrook d8a043f84b Create CollectionAlignmentConfiguration 2018-09-10 23:45:56 -04:00
Dalton Claybrook 45b0881f1d Add Collection Alignment rule and implement basic left-alignment case 2018-09-10 23:45:56 -04:00