Commit Graph

314 Commits

Author SHA1 Message Date
JP Simard a2f06246d0 improve MissingDocsRule
by checking for documentation comment body rather than doc comment attribute
2016-01-13 15:59:37 -08:00
JP Simard 9eabd45ce5 add "Missing Docs" rule 2016-01-13 15:59:37 -08:00
JP Simard 4c52163a70 add rule to encourage checking isEmpty over comparing count to zero 2016-01-13 15:41:25 -08:00
JP Simard e13907ead3 fix infinite regex search & 'where' false positive in ConditionalBindingCascadeRule 2016-01-12 18:35:31 -08:00
JP Simard 2f3b2096e6 support opt-in rules 2016-01-12 12:11:09 -08:00
JP Simard 7268d373cc minor tweaks from #314 2016-01-12 11:41:33 -08:00
Scott Hoyt 47f4889cb2 Removed redundant self. 2016-01-11 13:55:36 -08:00
Scott Hoyt 647371517e Extracted arrayOf to Array extension and used to simplify VariableNameMinLengthRule.init?(config:). 2016-01-11 13:10:17 -08:00
Scott Hoyt 55fa348b6d Made ParameterizedRule protocol inherit from ConfigurableRule with default implementation for conformance. 2016-01-11 11:21:49 -08:00
Scott Hoyt 8d6f1ad1d7 Added [Int] support for VariableNameMinLengthRule configuration. 2016-01-11 11:21:49 -08:00
Scott Hoyt 46838b11f1 Fixed access level issues. 2016-01-11 11:21:49 -08:00
Scott Hoyt 23265f0ff6 Changed VariableNameMinLengthRule.isEqualTo to use a guard. 2016-01-11 11:21:49 -08:00
Scott Hoyt 53efa3f23b Removed spurious selfs 2016-01-11 11:21:49 -08:00
Scott Hoyt 30e7018532 Fixed typo in rule name and reattributed. 2016-01-11 11:21:49 -08:00
Scott Hoyt d3184c9e28 Switched ParameterizedRule.init?(config:) to use a guard instead of if/else. 2016-01-11 11:21:49 -08:00
Scott Hoyt da45c7fe88 Switched out force cast with failable cast in Configuration.rulesFromDict() 2016-01-11 11:21:49 -08:00
Scott Hoyt 6d53ab152a Replaced YAML array flattening with simpler version. 2016-01-11 11:21:49 -08:00
Scott Hoyt 811b625243 Generalized ParameterizedRule protocol conformance to ConfigurableRule. 2016-01-11 11:21:49 -08:00
Scott Hoyt bd6aab8478 Remove debug output. 2016-01-11 11:21:49 -08:00
Scott Hoyt 60583256fe Replaced VariableNameMinLengthRule with new version using ConfigurableRule 2016-01-11 11:21:49 -08:00
Scott Hoyt 7bb8316664 Removed new test rule from master list and made to pass tests. 2016-01-11 11:21:49 -08:00
Scott Hoyt acda12447b Update VariableNameMinLengthNew.isEqualTo for bug in how SwiftXPC handles comparing two empty [String]'s 2016-01-11 11:21:49 -08:00
Scott Hoyt dd58175000 Added example VariableNameMinLengthNewRule using ConfigurableRule. 2016-01-11 11:21:49 -08:00
Scott Hoyt 29cad2972a Removed TODOs 2016-01-11 11:21:49 -08:00
Scott Hoyt b654dc0c8b Clean up some linting warnings. 2016-01-11 11:21:49 -08:00
Scott Hoyt 8cd2d9f3f2 Removed ruleParametersFromArray from Configuration. 2016-01-11 11:21:49 -08:00
Scott Hoyt 7efb020a4b Added tests for configuring rules from config dictionary. 2016-01-11 11:21:49 -08:00
Scott Hoyt fa7d4024e3 Switched Configurable rule to a failable initializer that takes AnyObject. 2016-01-11 11:21:49 -08:00
Scott Hoyt c2d40c1f94 Extracted all ParameterizedRule conformance to ConfigurableRule out to protocol extension. 2016-01-11 11:21:49 -08:00
Scott Hoyt 3387c0d592 Extracted isEqualTo to protocol extension. 2016-01-11 11:21:49 -08:00
Scott Hoyt 9b6f3070a3 Wrote ConfigurableRule, made ParameterizedRule's conform, moved configuration into rules themselves. 2016-01-11 11:21:49 -08:00
Scott Hoyt eab96555e5 Switch to non optional Configuration initialization from dictionary. 2016-01-11 11:18:54 -08:00
Scott Hoyt 6510960fa6 Began extracting Yaml dependency out of Configuration and into YamlParser 2016-01-11 11:18:54 -08:00
Scott Hoyt e797f9d282 Remove unnecessary Yaml extensions. 2016-01-11 11:18:54 -08:00
Scott Hoyt 31b9cc0149 Remove redundant YAML functions from Configuration. 2016-01-11 11:18:54 -08:00
Scott Hoyt f0cb4d81c3 Added dictionary-based initialization for Configuration. 2016-01-11 11:14:54 -08:00
Scott Hoyt 909ca9fcb6 Added masterRuleList. 2016-01-11 11:14:54 -08:00
Scott Hoyt ddcc67273b Added tests for new Yaml+SwiftLint extensions. 2016-01-11 11:14:54 -08:00
Scott Hoyt 2731c8ee55 Added flattening extensions to Yaml. 2016-01-11 11:14:54 -08:00
Scott Hoyt a81b228e5f Extracted Yaml extensions out of Configuration.swift 2016-01-11 11:14:54 -08:00
JP Simard a0a76d898f fix escaped double quote character 2016-01-11 08:55:10 -08:00
JP Simard 8fbc88254c escape strings when using CSV reporter 2016-01-11 08:50:15 -08:00
Aaron McTavish 7b046465c8 Fixed two more edge cases for non-triggering examples 2016-01-11 07:41:56 -08:00
Aaron McTavish c5873a4620 Fixed alphabetising list 2016-01-11 07:40:44 -08:00
Aaron McTavish fb234901df Fix initial newline 2016-01-11 07:40:41 -08:00
Aaron McTavish 1b6dbabb40 Improve performance of ConditionalBindingCascadeRule 2016-01-11 07:40:33 -08:00
Aaron McTavish fe3136d8ff Adding ConditionalBindingCascadeRule 2016-01-11 07:40:16 -08:00
Norio Nomura 7fa100a033 Reduce calls to String.characters.count in LineLengthRule.validateFile(_:)
By applying this, the duration of linting Carthage is reduced from:
```
swiftlint lint  20.07s user 1.10s system 84% cpu 25.023 total
```
to:
```
swiftlint lint  18.27s user 1.05s system 84% cpu 22.769 total
```
2016-01-10 20:44:36 +09:00
JP Simard f3cf551c12 Merge pull request #333 from realm/nn-reducing-calls-to-sourcekit
Add SourceKit response cache for reducing calls to SourceKit
2016-01-09 10:22:01 -08:00
Norio Nomura 755619d3f8 Add SourceKit response cache for reducing calls to SourceKit
This depends on https://github.com/jpsim/SourceKitten/pull/135
By applying this, the duration of linting Carthage is reduced from:
```
swiftlint lint  27.85s user 1.98s system 77% cpu 38.538 total
```
to:
```
swiftlint lint  21.15s user 1.26s system 80% cpu 27.743 total
```
2016-01-09 23:49:07 +09:00