Marcelo Fabri
b95a9d6f3d
Change rule to be enabled by default
2017-09-11 02:35:37 -03:00
Marcelo Fabri
3132c884f3
Fix existing violations
2017-09-11 01:53:40 -03:00
Marcelo Fabri
4f0dbfb686
Add fallthrough opt-in rule
...
Fixes #1834
2017-09-11 01:53:40 -03:00
JP Simard
01e4831a7c
Update for Swift 4 in Xcode 9 beta 6 and latest Linux snapshot
2017-09-10 13:48:37 -07:00
Marcelo Fabri
f1b89e1409
Fix false negatives in unneeded_parentheses_in_closure_argument with capture lists
...
Fix #1817
2017-09-08 01:04:05 -03:00
Marcelo Fabri
d0497fa1de
Merge pull request #1776 from Uncommon/let-var-objc
...
Improve attribute handling for let_var_whitespace
2017-09-08 00:42:25 -03:00
Marcelo Fabri
03edafae15
Merge pull request #1797 from marcelofabri/rules-tests
...
Validate rules docs when running unit tests
2017-09-08 00:41:22 -03:00
David Catmull
df7cd41368
Add test case for #1812
2017-09-05 09:04:34 -06:00
David Catmull
c1cf5d420a
Fix for attributes with underscores, and multiple lines of attributes
2017-09-05 09:01:18 -06:00
David Catmull
610b392f78
Make it faster: only call attributeLineNumbers() once
2017-09-05 09:01:18 -06:00
David Catmull
46125bcf28
Whitespace fix
2017-09-05 09:01:18 -06:00
David Catmull
3ec8a1427b
Fix unicode handling: byte vs character offset
2017-09-05 09:01:18 -06:00
David Catmull
d719e62600
Fix attribute handling (almost working)
...
The test cases that prepend comments aren't working.
2017-09-05 09:01:18 -06:00
David Catmull
2e091b54b6
Add @objc to the ignored directives for let_var_whitespace
2017-09-05 09:01:18 -06:00
Marcelo Fabri
0c277e081f
Improve how opening_brace reports locations
...
Fixes #1811
2017-08-31 18:15:28 -03:00
Marcelo Fabri
f074ff7f47
release 0.22.0
2017-08-30 14:38:04 -03:00
Marcelo Fabri
53380531ff
Improve unneeded_parentheses_in_closure_argument
2017-08-29 16:43:56 -03:00
Erik Strottmann
6fca21cdf6
Add multiple_closures_with_trailing_closure rule
...
Multiple Closures with Trailing Closure rule disallows trailing closure
syntax when passing more than one closure argument to a function.
Fixes #1801 .
2017-08-27 22:03:22 -07:00
Marcelo Fabri
5a2335033f
Improve syntactic_sugar message to be type-specific
...
Fixes #1803
2017-08-27 18:15:17 -03:00
Maz Jaleel
03676c9772
Add No Grouping Extension Rule ( #1789 )
2017-08-27 22:10:05 +01:00
Marcelo Fabri
1d68a8dab4
Make rule opt-in
2017-08-26 10:05:56 -03:00
Marcelo Fabri
54f9c22c60
Fix existing violations
2017-08-26 10:05:56 -03:00
Marcelo Fabri
d082f96284
Add pattern_matching_keywords rule
2017-08-26 10:05:56 -03:00
Maz Jaleel
73edd5cf2a
explicit types checking for implicit raw value support
2017-08-26 07:58:31 +04:00
Maz Jaleel
5335060935
update rule name
2017-08-26 07:15:54 +04:00
Maz Jaleel
fb193c981d
review changes (cleanup params)
2017-08-26 07:07:06 +04:00
Maz Jaleel
cba94930a4
cleanup non-trigger examples
2017-08-26 07:07:06 +04:00
Maz Jaleel
adfcbf4ff7
truncate long line
2017-08-26 07:07:06 +04:00
Maz Jaleel
1929228ce6
thank god for autocorrect
2017-08-26 07:07:06 +04:00
Maz Jaleel
742bb2fd8f
initial rule implementation
2017-08-26 07:07:06 +04:00
Marcelo Fabri
43925199d4
Validate rules docs when running unit tests
...
Fix #1734
2017-08-24 21:27:35 +02:00
JP Simard
d830392c95
make sourcery
2017-08-22 09:43:44 -07:00
JP Simard
2c94e54bd6
Fix 'is_disjoint' violations in SwiftLint itself
2017-08-21 16:00:34 -07:00
JP Simard
ef3df839ce
Add is_disjoint rule
...
to encourage using `Set.isDisjoint(with:)` over `Set.intersection(_:).isEmpty`.
2017-08-21 16:00:33 -07:00
JP Simard
b39b369d12
Fix setting Swift version when caching.
...
See https://github.com/realm/SwiftLint/pull/1790/files#r134323431 .
2017-08-21 13:28:43 -07:00
Marcelo Fabri
bc79042e44
Fix false positive on unused_enumerated rule with complex variable bindings
...
Fix #1787
2017-08-21 11:47:32 +02:00
Marcelo Fabri
f4690859b1
Merge pull request #1790 from marcelofabri/swift-version-cache
...
Invalidate cache when Swift version changes
2017-08-21 11:03:00 +02:00
Marcelo Fabri
1f611c326e
Space
2017-08-21 00:24:09 +02:00
Marcelo Fabri
0a07628d8c
Invalidate cache when Swift version changes
2017-08-21 00:19:04 +02:00
Marcelo Fabri
70488c9f0c
Add SuperfluousDisableCommandRule
2017-08-20 23:27:48 +02:00
JP Simard
93b067ebdc
refactor VerticalWhitespaceRule.validate(_:) to trigger a violation
...
regardless of whether or not the rule is disabled at that location.
Generally, rules shouldn't need to check if it's disabled when
triggering violations, since violations in disabled violations are
filtered out by the linter, which enables the ability to detect
superfluous disable commands that don't silence any violations.
2017-08-20 23:27:48 +02:00
JP Simard
c57e8b081b
modify let_var_whitespace's examples to pass 'disable command' tests
2017-08-20 23:27:48 +02:00
JP Simard
5c1c9389c7
produce an error when a 'disable' command doesn't silence any rules
2017-08-20 23:27:48 +02:00
Marcelo Fabri
05eb60a67e
Check if spec() is instance method
2017-08-18 12:09:42 +02:00
Marcelo Fabri
084850af7a
Alternative approach without ASTRule
2017-08-18 12:09:20 +02:00
Ornithologist Coder
1908160d2b
Update Rules file
2017-08-18 11:34:37 +02:00
Ornithologist Coder
fe96e4139a
Improve validation
...
* Apply 'cheap' validation earlier. It's not a call to a restrictive
method, returns no violations.
* But if it it's a call to a restrictive method, then checks if the file
containts a QuickSpec and if the call is within the bounds of the
QuickSpec class.
2017-08-18 11:24:03 +02:00
Ornithologist Coder
da98afcaf7
Apply code review changes
2017-08-18 11:24:03 +02:00
Ornithologist Coder
339e23070e
Rename examples file and update headers
2017-08-18 11:24:03 +02:00
Ornithologist Coder
c707adb0d8
Add quick_discouraged_call opt-in rule
...
Implements #1781 (Method calls and object initialization inside Quick
'describe' and 'context' blocks can be harmful)
2017-08-18 11:24:02 +02:00