Commit Graph

1753 Commits

Author SHA1 Message Date
Marcelo Fabri 41f8b1971d Merge pull request #1862 from sirlantis/add-new-multiline-arguments-rule
Add MultilineArgumentsRule
2017-10-02 00:20:28 -03:00
Marcelo Fabri 44f3e3895c Merge pull request #1873 from marcelofabri/queuedFatalError-custom-rule
Add custom rule to enforce using queuedFatalError
2017-10-01 20:49:52 -03:00
JP Simard 508ab99c38 Merge pull request #1868 from atetlaw/at-fix-csv-reporter
Fix csv reporter to output records with new lines
2017-10-01 16:06:46 -07:00
Marcelo Fabri 81f90e6326 Add custom rule to enforce using queuedFatalError 2017-10-01 20:05:46 -03:00
Marcelo Fabri 05685785f2 Merge pull request #1864 from marcelofabri/improve-allowed-symbols
Fix false negatives when using allowed_symbols
2017-10-01 01:11:46 -03:00
Marcelo Fabri ffa4e8a3fb Workaround union not working on Linux on Swift 3.1 2017-10-01 00:45:52 -03:00
Andrew Tetlaw 0a590e8ebe Removed that trailing return 2017-10-01 11:44:37 +08:00
Andrew Tetlaw 4a37839401 Output CSV in rows
- changed CSV reporter to out put the header row and each violation row with returns, in the way that can be imported into a spreadsheet for example.
- updated the test output CSV file for the unit test
2017-10-01 11:34:49 +08:00
Marcelo Fabri be341f90b9 Introduce queuedFatalError
`fatalError` prints the full path of the file, which leaks filesystem information from the machine that built the binary. Now that we release via CocoaPods, this is more critical.
2017-09-30 15:07:23 -03:00
Marcelo Fabri e24d847596 Prevent crash on Swift 3.x 2017-09-30 01:38:26 -03:00
Marcelo Fabri 06f9d4c0f7 Fix false negatives when using allowed_symbols 2017-09-30 00:50:30 -03:00
Marcelo Fabri dc3991ad27 Fix failing test 2017-09-30 00:29:23 -03:00
Marcelo Fabri d21262d1bc Ignore SwiftLint commands in file_header rule
Fixes #1810
2017-09-30 00:29:23 -03:00
Marcel Jackwerth e9d65e3b5d MultilineArgumentsRuleConfiguration -> MultilineArgumentsConfiguration 2017-09-30 01:28:45 +02:00
Marcel Jackwerth b97dc5814f Refactor MultilineArgumentsRuleConfiguration 2017-09-30 01:26:29 +02:00
Marcel Jackwerth c435475c2c Added first_argument_location option 2017-09-30 01:01:56 +02:00
Marcel Jackwerth 4899c0b171 Add a few more examples 2017-09-29 23:08:46 +02:00
Marcel Jackwerth 25ad3f0d1d Fix some and add more tests 2017-09-29 23:08:46 +02:00
Marcel Jackwerth 4945ee29b7 Add MultilineArgumentsRule 2017-09-29 23:08:46 +02:00
JP Simard b228a4ffa6 Speed up LetVarWhitespaceRule.attributeLineNumbers(file:)
By treating each .attributeBuiltin as a match rather than performing
a regular expression along with many byte offset to string offset
conversions.
2017-09-28 17:06:20 -07:00
Marcelo Fabri a0e0824b59 Fix false positive in class_delegate_protocol with Swift 4.0.1
Fixes #1856
2017-09-28 14:11:15 -03:00
JP Simard 6367d541b2 Improve compile time by speeding up slow type inference expressions 2017-09-19 17:26:24 -07:00
JP Simard eb9acae04d Revert use of NSRange.contains(_:) added in b3340c3
Since that's only available in Swift 4.0 or later, and we still support
Swift 3.x.
2017-09-19 11:10:35 -07:00
JP Simard 06781c7ddd Simplify CharacterSet+LinuxHack.swift 2017-09-17 17:28:32 -07:00
JP Simard b3340c30b3 Small changes to ContainsOverFirstNotNilRule 2017-09-17 16:50:58 -07:00
Samuel Susla 9dcb3dbeb7 Add contains_over_first_not_nil rule 2017-09-17 15:59:40 +01:00
Marcelo Fabri 70b3ffee28 Merge pull request #1841 from marcelofabri/array-init-rule
Add array_init opt-in rule
2017-09-16 16:11:02 -03:00
Marcelo Fabri 3431f2e455 Fix unit tests on Linux with Swift 3.1 2017-09-16 13:34:19 -03:00
Marcelo Fabri de6809b40f Remove hack for SR-3485 when building with Swift 4 2017-09-16 13:23:49 -03:00
Marcelo Fabri 4c8d25185b Fix false positives 2017-09-16 04:27:56 -03:00
Marcelo Fabri 8f05f92cd1 Add array_init opt-in rule
Fixes #1271
2017-09-16 02:32:48 -03:00
Marcelo Fabri 07e011e237 Refactor isCommentLike to use existing list 2017-09-16 02:26:26 -03:00
Marcelo Fabri 038af4effb Merge pull request #1839 from marcelofabri/function-call-colon
Add support to function calls on `colon` rule
2017-09-14 16:58:39 -03:00
Marcelo Fabri b5f51bb761 Fix false positive in for_where with if var
Fixes #1838
2017-09-14 11:10:28 -03:00
Marcelo Fabri 0bbbaee56f Add support to function calls on colon rule 2017-09-13 19:47:14 -03:00
Austin Lu 9f3ff26668 Enable rule by default, and update wording 2017-09-12 09:26:42 -07:00
Austin Lu b2a17026cc Add SwitchCaseAlignmentRule 2017-09-12 09:26:42 -07:00
Marcelo Fabri 8d6ab5a120 Handle false positive 2017-09-11 03:09:53 -03:00
Marcelo Fabri bfa88e074a Add more examples to colon rule 2017-09-11 03:09:53 -03:00
Marcelo Fabri ef4dde90b7 Improve colon rule to catch dictionary types and Any
Fixes #1074
2017-09-11 03:09:53 -03:00
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