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
c85d3099a1
Update documentation
2019-11-09 13:29:43 -08:00
Paul Taykalo
a52a94c987
Use Generic Dictionary Traversing for multiple cases
2019-11-09 13:29:43 -08:00
Paul Taykalo
848370a522
Simpler check for FileTypesOrderRule
2019-11-08 01:35:01 +02:00
Paul Taykalo
ac40778cb3
Use SwiftLintFile wrapper over the File
2019-11-07 15:19:17 +02:00
Paul Taykalo
ec6d82af56
Cache Access Control Level property
2019-11-07 11:52:50 +02:00
Paul Taykalo
b1cdc119ec
Use swift enums instead of raw values
2019-11-07 11:05:19 +02:00
Paul Taykalo
4fff698c09
Update UnusedDeclarationRule to use SourceKittenDictionary
2019-11-07 10:28:30 +02:00
Paul Taykalo
18a3896f97
Update swift structure dictionary
2019-11-07 08:51:16 +02:00
Paul Taykalo
f0ad230e81
fix linting issues
2019-11-07 08:50:50 +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
JP Simard
ffb2f4f76d
Require Swift 5.0 to build ( #2857 )
...
* Require Swift 5.0 to build
* Update CI
* Stop testing with Swift 4.x & Xcode 10.0/10.1
* Use official Swift docker image instead of norionomura's
* Use Xcode 10.3 as latest stable version
* Update READMEs
* Fixup xcodeproj
* Fixup CI Swift container image tag
* Fixup changelog
2019-09-03 11:42:57 -04:00
Marcelo Fabri
40bc8de5c7
Add no_space_in_method_call rule ( #2855 )
...
* Add no_space_in_method_call rule
* Avoid false positive with typecasting
2019-09-03 10:03:21 -04:00
Marcelo Fabri
3879151abf
Enable some opt-in rules ( #2801 )
2019-08-28 14:49:23 -07:00
Marcelo Fabri
b24fd6cdd4
Enable contains_over_filter_is_empty in SwiftLint itself
2019-08-25 20:58:11 -07:00
a-25
40457a7044
Fixed false positive in colon ( #2836 )
2019-08-14 08:42:34 -07:00
Marcelo Fabri
596bf8dbc8
Detect parameter attribute in vertical_parameter_alignment
...
Fixes #2792
2019-07-04 10:42:11 -07:00
Sam Rayner
7b82250995
#2749 Fix file_types_order in extension-only files
...
Prevents extensions being flagged as in the wrong order when a file only contains extensions and nothing else (enums, classes, structs). In this case it's not intuitive that the longest extension be considered the "main" one so the file can be considered as having no "main" type.
2019-05-13 13:59:16 +01:00
Dalton Claybrook
696cdf801c
Add triggering examples with parentheses to the number separator rule tests
2019-04-02 09:02:49 -04:00
Dalton Claybrook
ce2d1c973b
Update variable name to be more specific which negates the need for a comment
2019-03-27 07:51:39 -04:00
Dalton Claybrook
a5d4fb1c14
Add comment explaining the fix
2019-03-27 07:51:39 -04:00
Dalton Claybrook
10711bb92b
Fix issue where using parentheses around a number could result in a false-positive on number_separator
2019-03-27 07:51:39 -04:00
Cihat Gündüz
b145d666d0
Fix issues after rebasing to master
2019-03-27 11:54:56 +01:00
Cihat Gündüz
7d5aa7a574
Fix holdover from debugging session (aka "rogue print call")
2019-03-27 10:34:58 +01:00
Cihat Gündüz
311965f23c
Fix issues after rebase
2019-03-27 10:34:58 +01:00
Xaver Lohmüller
57af7f0e30
Add ReduceBooleanRule ( #2675 )
...
* [reduce_boolean] Implement rule
* [reduce_boolean] Improve reason text
* [reduce_boolean] Fix new violations
* [reduce_boolean] Add CHANGELOG.md entry
* [reduce_boolean] Shorten rule name
* [reduce_boolean] Use regular map instead of compactMap
* [reduce_boolean] Match only possible syntax kinds
2019-03-10 10:54:14 -07:00
Marcelo Fabri
6b3b89cff4
Colon rule now catches violations on generic type declarations
...
Fixes #2628
2019-03-03 20:06:13 -08:00
Paul Taykalo
1b0ac66334
Update reduce to reduce:into for a bit faster running ( #2657 )
2019-02-22 09:29:39 -08:00
Cihat Gündüz
3ab600f5a2
[number_separator] Add more non-triggering examples + Rename option to exclude_ranges
2019-02-14 21:19:15 +01:00
Cihat Gündüz
57fe9947a6
[number_separator] Add valid_ranges option instead of ignoring years by default
2019-02-14 21:19:15 +01:00
Cihat Gündüz
85a6a77791
[number_separator] Allow year integer literals to be written without separator
2019-02-14 21:19:15 +01:00
Cihat Gündüz
efee4ed582
[number_separator] Add false positives to default non-triggering examples
2019-02-14 21:19:15 +01: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
Maru
d8a91501a6
Remove unmeaning comment in colon rule ( #2610 )
2019-01-29 08:30:09 -08:00
Marcelo Fabri
e4ba455cf0
Merge pull request #2599 from realm/mf-migrate-correctable-rules
...
Migrate CorrectableRules to use new protocols
2019-01-27 21:42:07 -08:00
JP Simard
9cec649ab6
Add tests that fail with Swift 5 ( #2604 )
...
These are tests that pass with Swift 4.2.x but fail with Swift 5.0
from Xcode 10.2 beta 1.
2019-01-27 20:54:03 -08:00
JP Simard
f08c3e4239
Use firstIndex(where:) instead of index(where:) ( #2600 )
...
to silence a Swift 5 warning. This is compatible with Swift 4.2.
2019-01-27 20:19:16 -08:00
Marcelo Fabri
b3c399b025
Migrate EmptyParametersRule
2019-01-27 19:05:31 -08:00
Marcelo Fabri
c1002d7fc6
Migrate EmptyEnumArgumentsRule
2019-01-27 19:02:57 -08:00
Marcelo Fabri
225780ad32
Migrate CommaRule
2019-01-27 19:00:53 -08:00
Marcelo Fabri
dbe920da69
Migrate EmptyParenthesesWithTrailingClosureRule
2019-01-27 18:59:38 -08:00
Marcelo Fabri
19df08ff93
Convert ClosingBraceRule
2019-01-27 18:57:25 -08:00
Marcelo Fabri
d52eb0c64b
Migrate ImplicitReturnRule
2019-01-27 18:40:56 -08:00
Marcelo Fabri
7c5c742d36
Migrate ProtocolPropertyAccessorsOrderRule
2019-01-27 18:39:08 -08:00
Marcelo Fabri
1dbd255c52
Migrate RedundantDiscardableLetRule
2019-01-27 18:38:04 -08:00