Commit Graph

2009 Commits

Author SHA1 Message Date
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
Varun P M 794160a8d2 Added ignores_default_parameters when calculating parameter count 2018-05-10 17:40:30 +05:30
Ornithologist Coder 5eea1d10ba Add empty_xctest_method opt-in rule 2018-05-10 14:05:42 +02:00
Eric Horacek aaf0b9a5d7 compactMap, whitespace 2018-05-08 21:54:04 -07:00
Eric Horacek d21b787980 Make closure end indentation rule correctable 2018-05-08 21:00:19 -07:00
Marcelo Fabri dc93d1de82 Fix false positive in redundant_set_access_control
Fixes #2182
2018-05-06 21:42:00 -07:00
Eric Horacek 326c53cc56 Only validate if first argument starts with a newline 2018-05-06 15:07:01 -07:00
Eric Horacek b9a2862d12 Include named closure parameters in closure end indentation
Fixes #2121
2018-05-06 15:07:01 -07:00
JP Simard 4bf69d7d84 Remove newlines from switch case reason 2018-05-06 14:33:47 -07:00
freak4pc 1ba963c443 Address PR feedback from @jpsim 2018-05-07 00:06:00 +03:00
freak4pc 3738512511 Added indented triggering cases 2018-05-06 23:34:14 +03:00
freak4pc 4d3a1173b6 Apply correct severity form configuration 2018-05-06 23:34:14 +03:00
freak4pc d429ad4358 Get rid of duplicated RuleConfiguration and use reason instead 2018-05-06 23:34:14 +03:00
freak4pc 62d0dd14ca Remove headers 2018-05-06 23:34:14 +03:00
freak4pc 7809ac731a Add specific violation reason for switch_case_alignment based on configuration. 2018-05-06 23:34:14 +03:00
freak4pc fbdba25636 Further abstracted non-triggering and triggering examples based on config.
Also updated ACL to be internal for rule Examples.
2018-05-06 23:34:14 +03:00
freak4pc 8e0202cfc8 Added violation marker and fixed tests 2018-05-06 23:34:14 +03:00
freak4pc ca47802fd4 Add tests for indented and non-indented cases (still failing WIP) 2018-05-06 23:34:14 +03:00
freak4pc 9cc41ac9cf Switched to indented_cases bool style 2018-05-06 23:34:14 +03:00
freak4pc e8b64b4a72 Add indentation to SwitchCaseAlignmentRule 2018-05-06 23:34:13 +03:00
JP Simard e89e56b99a Fix TrailingCommaRuleTests for Swift < 4.1 2018-05-06 13:11:17 -07:00
JP Simard c5de0f481f Refactor LineLengthConfiguration.apply(configuration:)
to avoid high cyclomatic complexity
2018-05-06 10:54:46 -07:00