Commit Graph

246 Commits

Author SHA1 Message Date
JP Simard fc3545be1b minor refactorings 2016-01-02 15:59:16 -08:00
JP Simard 281a4dc587 no longer mirror some NSString methods in a String extension 2016-01-02 15:52:56 -08:00
Scott Hoyt 5b023501c2 Tested merge. 2016-01-02 15:41:53 -08:00
Scott Hoyt 7b2f4bff43 Moved == implementation for [Rule] to more appropriate spot. Wrote missing test. 2016-01-02 15:41:53 -08:00
Scott Hoyt fcf9396a08 Added isEqual for Rule and ParameterizedRule. Made Configuration and RuleParameter conform to Equatable. Wrote tests to verify. All done in support of testing recursive configuration file search. 2016-01-02 15:41:53 -08:00
Scott Hoyt 88749c1e87 Updated comments. 2016-01-02 15:41:53 -08:00
Scott Hoyt 4361adca10 Silence the logging inside of Configuration.init instead. 2016-01-02 15:41:53 -08:00
Scott Hoyt f35f3d4a6c Revert "Silently load nested configurations."
This reverts commit d8c418e167.
2016-01-02 15:41:53 -08:00
Scott Hoyt 0d4fce9520 Silently load nested configurations. 2016-01-02 15:41:53 -08:00
Scott Hoyt ae15223789 Refactor Configuration initialization from yml for efficiency. 2016-01-02 15:41:53 -08:00
Scott Hoyt 4b0b4d7431 Added use_nested_configs option for .swiftlint.yml (defaults to no). 2016-01-02 15:41:53 -08:00
Scott Hoyt bd26e4c3af Use new String extension. 2016-01-02 15:41:53 -08:00
Scott Hoyt 9188d161f5 Added recursive search for configurations. 2016-01-02 15:41:53 -08:00
Scott Hoyt 43edbdb0d7 Added String extensions. 2016-01-02 15:41:53 -08:00
JP Simard 029a5eb008 Merge pull request #292 from realm/jp-command-modifiers
Support command comment modifiers
2015-12-30 15:32:59 -08:00
JP Simard ccdebe9791 Merge pull request #300 from realm/jp-test-violation-locations
test violation locations
2015-12-27 22:04:18 -05:00
JP Simard 65f992d8fe Support command comment modifiers
addresses #222
2015-12-27 21:06:12 -05:00
Norio Nomura 090c061255 Fix #295 2015-12-28 09:23:22 +09:00
Norio Nomura e120984a81 Add failing test to ValidDocsRule.swift
Check for multibyte characters in .swift
2015-12-28 09:23:22 +09:00
JP Simard ce6ef95668 Merge pull request #296 from realm/fix-294
Fix NSRangeException crash in swiftlint
2015-12-27 19:05:10 -05:00
JP Simard 85d8c68978 test violation locations 2015-12-27 13:33:42 -05:00
Norio Nomura 5b63b6bfa7 Fix #294 2015-12-27 14:52:22 +09:00
JP Simard e546ecb094 add checkstyle reporter. addresses #277 2015-12-25 02:31:38 -05:00
JP Simard 8d529f1804 Fix multibyte handling in many rules 2015-12-24 20:59:15 -05:00
JP Simard 0c7e7299f4 release 0.5.3 2015-12-23 23:57:42 -05:00
JP Simard 4c770d52c9 fix superfluousOrMissingParameterDocumentation regression
where commentParameters.count > labelsAndParams.count
2015-12-23 23:45:03 -05:00
JP Simard d50a78e85c don't require documentation for unlabelled parameters 2015-12-23 23:26:49 -05:00
JP Simard e8a8f4042e eagerly match parameters in ValidDocsRule 2015-12-23 23:26:19 -05:00
JP Simard 26dba4eeb7 Merge pull request #288 from norio-nomura/optimize-invalid-doc-offsets
Optimize `invalidDocOffsets(_:)`
2015-12-23 11:49:36 -05:00
Norio Nomura abf1968d06 Change guard condition to fails earlier
This commit reduces the duration of linting KeychainAccess from:
```
swiftlint lint  5.37s user 0.14s system 93% cpu 5.889 total
```
to:
```
swiftlint lint  3.74s user 0.13s system 91% cpu 4.238 total
```

the duration of linting Carthage is reduced from:
```
swiftlint lint  33.48s user 1.86s system 82% cpu 42.645 total
```
to:
```
swiftlint lint  29.61s user 1.81s system 79% cpu 39.377 total
```
2015-12-23 20:23:38 +09:00
Norio Nomura 859e8b2f03 Change to fail on YAML parser error if configuration file is required
This will help user to noticing YAML parser error.
2015-12-23 15:29:19 +09:00
Norio Nomura a1f734e55d Add printing error when Yaml.load(_:) returns error
This will help finding error from YAML parser without using third-party YAML validator.
2015-12-23 15:08:54 +09:00
JP Simard b21ae55a3b small fixes after #283 2015-12-22 23:34:56 -05:00
JP Simard c898b25ba3 Merge pull request #283 from brianpartridge/bp/auto-correct-colon-rule
Add autocorrect for ColonRule.
2015-12-22 23:30:09 -05:00
Brian Partridge f8c1771a32 Review feedback. 2015-12-21 18:31:46 -05:00
Brian Partridge 9508fb1165 Add autocorrect for ColonRule. 2015-12-21 08:22:44 -05:00
Yasuhiro Inami 05efe54d28 Add ClosingBraceRule. 2015-12-19 15:59:32 +09:00
Yasuhiro Inami ff3dd5bea2 Minor update for File+SwiftLint.swift 2015-12-19 13:40:39 +09:00
Yasuhiro Inami afcc64bb63 Change to private let. 2015-12-19 13:21:40 +09:00
Yasuhiro Inami d5908b04fb Add File.ruleEnabledViolatingRanges() 2015-12-19 13:19:02 +09:00
Yasuhiro Inami a6d46992db Improve & add autocorrect test for OpeningBraceRule. 2015-12-19 13:19:02 +09:00
Yasuhiro Inami 39857ecda8 Improve autocorrect for OpeningBraceRule. 2015-12-19 13:19:02 +09:00
JP Simard eab6bf5075 release 0.5.2: Snuggle™ 2015-12-18 09:32:35 -08:00
Diogo Guimaraes 90a98dcea4 Fix return validation 2015-12-18 14:18:51 +00:00
JP Simard 51653b7d5e release 0.5.1 2015-12-13 17:08:21 -08:00
Norio Nomura b8ddf80b7f Apply reviews 2015-12-14 09:02:53 +09:00
Norio Nomura 8f802996bd Optimize File.matchPattern(_:) -> [(NSRange, [SyntaxKind])]
Change from converting match's position to converting token's position.
By applying this, duration of linting KeychainAccess is reduced from 752+sec(I can't wait completion) to 27sec.
2015-12-13 21:04:44 +09:00
JP Simard c196efa1da release 0.5.0 2015-12-12 18:03:58 -08:00
michallaskowski f3e5277641 Exclude files from included folders. 2015-12-13 01:20:49 +01:00
JP Simard f9f9d3c10e get correctable rules by casting configured rules as CorrectableRule 2015-12-05 21:09:43 -08:00