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
Max Härtwig
44b04f377d
Allow SubstitutionCorrectableRule to return nil instead of a correction to indicate that a suitable correction couldn't be found for a specific case ( #2958 )
2020-01-02 23:15:40 -08:00
Paul Taykalo
73802c285d
Add own wrappers over syntax tokens and syntax map
2019-11-10 22:55:54 +02: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
Marcelo Fabri
d6dac23bc1
Migrate UnusedControlFlowLabelRule
2019-01-27 18:35:30 -08:00
JP Simard
0a42e64de0
Fix order in which corrections are applied
...
They're already ordered last to first in the file from the sorting
applied in `violationRanges(in file:)`
2019-01-05 21:33:42 -08:00
JP Simard
135a997c9c
Re-use bridged string
...
and inline firstToken(afterByteOffset:)
2019-01-05 21:30:58 -08:00
Marcelo Fabri
41868b35cb
Improvements on unused_control_flow_label correction
2019-01-05 19:21:18 -08:00
JP Simard
eb8f398683
Add shitty implementation of correction
2019-01-05 19:11:39 -08:00
Marcelo Fabri
d863fc9fb7
Add unused_control_flow_label rule
...
Fixes #2227
2019-01-05 18:59:32 -08:00