Allen Wu
abe3dd01c5
Fix ControlStatement rule failing to apply when clauses contain commas
2018-06-23 15:15:36 -07:00
JP Simard
8c5d2afa7c
release 0.26.0
2018-06-22 09:48:20 -07:00
Marcelo Fabri
1d28025789
Add convenience_type opt-in rule
...
Fixes #1871
2018-06-16 21:08:49 -07:00
Anders Hasselqvist
1efb78ef25
Fix unnecessary oss-check diff reports
...
Other minor improvements based on review feedback.
2018-06-14 00:48:14 +09:00
Anders Hasselqvist
2fee6db032
Support file placeholder with required/forbidden_string
2018-06-13 20:05:02 +09:00
Anders Hasselqvist
58202772d3
Support placeholder for forbidden_pattern
...
- Move regex creation for *_pattern to FileHeaderConfiguration
- Switch to using test fixures for the tests
2018-06-13 19:55:27 +09:00
Anders Hasselqvist
15af1a778f
Add file name matching to file_header rule
...
Add support of inserting a SWIFTLINT_CURRENT_FILENAME placeholder in the required_pattern.
The placeholder will be replaced by the lastPathComponent of the file's path.
2018-06-13 19:55:27 +09:00
Austin Belknap
723a1f9004
Find the correct case colon.
2018-06-11 09:30:19 -07:00
Austin Belknap
d2981d779f
Fix XCode build issues.
2018-06-11 09:30:19 -07:00
Austin Belknap
ac6ab37370
Switch from regex-based rule to AST.
2018-06-11 09:30:19 -07:00
Austin Belknap
55a7a08ed2
Fix file name.
2018-06-11 09:30:19 -07:00
Austin Belknap
1fdc5fda94
Add "No Fallthrough Only" Rule.
2018-06-11 09:30:19 -07:00
Eric Horacek
b85df7fa22
Raw value
2018-06-10 21:34:42 -07:00
Eric Horacek
a9c2f854c3
Address comments
2018-06-10 21:27:03 -07:00
Eric Horacek
f481aa4ac9
Add explanatory comment
2018-06-10 19:49:03 -07:00
Eric Horacek
3778ad35de
Fix non-function call false positive
2018-06-10 19:49:03 -07:00
Eric Horacek
56827ac0f3
Fix crashes
2018-06-10 19:49:03 -07:00
Eric Horacek
80dad5975b
Add more explicit types
2018-06-10 19:49:03 -07:00
Eric Horacek
7b8c97ad02
Add multiline function chain rule
...
See #2214
2018-06-10 19:49:03 -07:00
Marcelo Fabri
6e987a763e
Fix a false positive in unused_closure_parameter rule
...
Fixes #2062
2018-06-02 20:56:24 -07:00
Daniel Metzing
5c0e7c8c40
Update catch rule correction to avoid compilation issues
2018-05-31 14:27:22 +10:00
JP Simard
fffd9fd45b
Remove explicit Range initializers
...
these don't compile with Swift trunk and don't appear to be necessary.
2018-05-31 09:25:16 +10:00
JP Simard
e2b74bd867
Require Swift 4.0 or higher to build.
2018-05-30 14:00:17 +10:00
JP Simard
2f287ef3e7
Merge pull request #2208 from erichoracek/eh--mark-autocorrection-improvements
...
Improve mark rule autocorrection
2018-05-30 13:46:34 +10:00
Daniel Metzing
baa8b8d274
Fixing indentation
2018-05-22 22:43:57 +02:00
Daniel Metzing
d12919a076
Making UntypedErrorInCatchRule correctable
2018-05-22 22:23:23 +02:00
Marcelo Fabri
f2297d7387
Fix false positives in prohibited_super_call rule
...
Fixes #2212
2018-05-21 20:50:34 -07:00
Marcelo Fabri
09061b05c3
Fix false positives in attributes rule when @testable is used
...
Fixes #2211
2018-05-20 12:04:40 -07:00
Eric Horacek
139df3d612
Improve mark rule autocorrection
...
Adds a few additional cases for the MARK rule to autocorrect.
In our project, this made it so that the all MARK rule failures were corrected automatically. Before this change, we had over 30 failures that could not be autocorrected.
2018-05-16 11:08:24 -07:00
Marcelo Fabri
7a0f07c664
Mention #1341 on CHANGELOG
...
Fix #1341
2018-05-15 22:33:04 -07:00
Norio Nomura
6bcabfe5f8
Detect swift-4.1.2
2018-05-13 21:39:57 +09:00
JP Simard
ed04e75c8a
Fix indentation
2018-05-11 23:01:16 -07:00
JP Simard
84bfdca774
Enable File Name rule for SwiftLint & fix violations
2018-05-11 22:17:40 -07:00
JP Simard
24ec44d288
Add file_name opt-in rule
...
validating that file names contain the name of a
type or extension declared in the file (if any).
2018-05-11 22:17:39 -07:00
JP Simard
62a3b707fa
Merge pull request #2185 from marcelofabri/default-params-end
...
Add function_default_parameter_at_end rule
2018-05-11 20:42:08 -07:00
JP Simard
cfd43e3231
Merge pull request #2198 from erichoracek/eh—literal-expression-end-indentation-autocorrect
...
Make literal end indentation rule correctable
2018-05-11 20:41:47 -07:00
Marcelo Fabri
cadf6112fc
Merge pull request #2200 from marcelofabri/bugfix-2187
...
Fix false negatives in `implicit_return`
2018-05-11 13:17:53 -07:00
Marcelo Fabri
5de844f64d
Fix false negatives in implicit_return
...
Fixes #2187
2018-05-11 10:12:57 -07:00
JP Simard
add9b53ea3
Merge branch 'master' into master
2018-05-11 10:11:27 -07:00
Eric Horacek
c15e668a57
Fix accidental exponential linting
2018-05-11 09:49:30 -07:00
Eric Horacek
2184b526ef
Test cascading corrections
2018-05-11 09:49:30 -07:00
Eric Horacek
e259629b95
Make literal end indentation rule correctable
...
Follows the same ideas in #2192
2018-05-11 09:49:30 -07:00
Marcelo Fabri
588bed83e6
Add function_default_parameter_at_end rule
2018-05-11 09:18:30 -07:00
Marcelo Fabri
50f49ee7b7
Merge pull request #2189 from ornithocoder/empty_xctests
...
Add empty_xctest_method opt-in rule
2018-05-11 09:15:22 -07:00
Marcelo Fabri
1cec0ff8fb
Merge pull request #2199 from marcelofabri/bugfix-2188
...
Fix `unneeded_parentheses_in_closure_argument` false positives
2018-05-11 08:49:05 -07:00
Ornithologist Coder
d61fd40a95
Use substructure to check if method is empty
2018-05-11 10:10:54 +02:00
Marcelo Fabri
e5600cf587
Fixing #1897
2018-05-10 23:25:03 -07:00
Marcelo Fabri
c716a7d68c
Fix unneeded_parentheses_in_closure_argument false positives
...
Fixes #2188
2018-05-10 23:20:30 -07:00
Eric Horacek
f18571effc
Fix operator usage spacing nested generics false positive
...
This was being corrected to:
```
let model = Generic<Container<Button>, NSAttributedString > (
```
2018-05-10 16:09:15 -07:00
Ornithologist Coder
7cef22b968
Check if the method doesn't have any parameters
2018-05-11 00:11:31 +02:00