Danny Mösch
f127ba14dd
Ignore block comments in `let_var_whitespace` rule ( #4889 )
2023-04-16 00:10:03 +02:00
Danny Mösch
74dbd52add
Fix/improve some rule descriptions
2023-01-10 22:29:13 +01:00
Danny Mösch
e64e82d80d
Get rid of periods finishing rule descriptions
2023-01-10 22:29:13 +01:00
JP Simard
4bd7da32ea
Reduce visibility of rules to be `internal` ( #4533 )
...
There's no reason to expose these publicly and this will make it nicer
to move to a new module outside of the core SwiftLint functionality.
2022-11-09 11:01:26 -05:00
Danny Mösch
449190d324
Verify examples in rules by default and enforce explicit exclusion ( #4065 )
...
A rule must conform to ManuallyTestedExamplesRule to skip generation of a test for its examples.
2022-08-09 22:32:09 +02:00
Danny Mösch
a27c7da7e2
Allow custom attributes on lines directly before let/var declarations ( #3943 )
2022-04-26 22:00:44 +02:00
Danny Mösch
050473a0e1
Add optional prefer_self_in_static_references rule ( #3732 )
2021-11-29 18:42:53 +00:00
Paul Taykalo
693ee2cae9
Add Isnot Empty extension in the Swift Framework ( #3387 )
2020-11-07 18:42:55 -05: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
Paul Taykalo
66a4193aa3
Merge pull request #2956 from realm/improvement/let-var-whitespace-rule
...
Speedup LetVarWhitespaceRule
2019-11-12 21:09:57 +02:00
Paul Taykalo
e00a8bf11a
That day when regex can be faster than code
2019-11-12 20:36:47 +02:00
Paul Taykalo
d181cb0fd2
Speedup let var whitespace rule a bit
2019-11-12 03:03:22 +02: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
b1cdc119ec
Use swift enums instead of raw values
2019-11-07 11:05:19 +02:00
Paul Taykalo
b901c670d4
Cache file structure dictionary
2019-11-07 08:50:50 +02:00
Paul Taykalo
8c963d2c15
Working solution with SouceKittenDictionary wrapper
2019-11-07 08:50:50 +02:00
Paul Taykalo
d891b1ec60
Use binary search when searching for lines indexes in LetVarWhiteSpacesRule ( #2901 )
...
* Use binary search when searching for lines indexes
* Update Changelog
* Remove unused old method of searching line by offset
* Update line by offset call with already implemented function
2019-10-20 11:30:32 -07:00
Marcelo Fabri
34616f7fd0
Minor changes to LetVarWhitespaceRule.swift
2019-02-03 15:01:35 -08:00
Igor Palaguta
279f52c6ff
Add #error
2019-02-04 00:35:26 +02:00
Igor Palaguta
7078a5057b
ignore warning directives
2019-02-03 20:22:45 +02:00
JP Simard
0e862ca9c4
Enable vertical whitespace rules in SwiftLint
...
and fix violations
2018-12-02 14:01:23 -08:00
JP Simard
8d734366fb
Remove unused private declarations ( #2386 )
2018-09-03 16:45:02 -07:00
JP Simard
3961d6482b
Organize rules by kind in Xcode project ( #2341 )
2018-08-05 18:54:05 -07:00