Marcelo Fabri
07c076689b
Address performance issues
2016-01-14 20:24:47 -08:00
Marcelo Fabri
57cf38a388
Fix identation
2016-01-14 20:24:47 -08:00
Marcelo Fabri
04b2510926
FunctionBodyLengthRule should not count comment lines
2016-01-14 20:24:47 -08:00
JP Simard
78ec5244f7
combine guards in rebuildAllDeclarationsByType
2016-01-13 16:54:30 -08:00
JP Simard
12c510c605
don't parse class declarations in rebuildAllDeclarationsByType
...
because this is only used in the missing docs rule which handles class
declarations by checking the "override" keyword
2016-01-13 16:44:14 -08:00
JP Simard
270fa90f3a
make File.allDeclarationsByType lazier
2016-01-13 16:41:09 -08:00
JP Simard
a5eb7c64fb
[MissingDocsRule] skip inherited members when checking for missing docs
2016-01-13 16:41:08 -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
7268d373cc
minor tweaks from #314
2016-01-12 11:41:33 -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
53efa3f23b
Removed spurious selfs
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
bd6aab8478
Remove debug output.
2016-01-11 11:21:49 -08:00
Scott Hoyt
29cad2972a
Removed TODOs
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
e797f9d282
Remove unnecessary Yaml extensions.
2016-01-11 11:18: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
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
JP Simard
d60a85aae0
make commands with modifiers work for violations with line-only locations
2016-01-04 13:25:57 -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
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
bd26e4c3af
Use new String extension.
2016-01-02 15:41:53 -08:00
Scott Hoyt
43edbdb0d7
Added String extensions.
2016-01-02 15:41:53 -08:00
JP Simard
65f992d8fe
Support command comment modifiers
...
addresses #222
2015-12-27 21:06:12 -05:00
JP Simard
8d529f1804
Fix multibyte handling in many rules
2015-12-24 20:59:15 -05:00
Yasuhiro Inami
ff3dd5bea2
Minor update for File+SwiftLint.swift
2015-12-19 13:40:39 +09:00
Yasuhiro Inami
d5908b04fb
Add File.ruleEnabledViolatingRanges()
2015-12-19 13:19:02 +09: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
d7cd1418c7
fix nsrangeToIndexRange to use NSString indexing rather than grapheme clusters
2015-12-05 21:09:43 -08:00
JP Simard
f30b0791db
autocorrect trailing semicolon violations
2015-12-05 21:09:43 -08:00
JP Simard
4c771eb355
add File.append(_:) and File.write(_:)
2015-12-05 21:09:43 -08:00
JP Simard
9c3c61c54b
move filesToLintAtPath to NSFileManager extension in SwiftLintFramework
2015-12-05 20:44:00 -08:00
JP Simard
008f85f3ac
Fix issues with multi-byte characters. Fixes #234 .
2015-12-03 14:49:44 -08:00
JP Simard
9cc9e64374
add Valid Docs rule
2015-11-29 21:58:16 -08:00
JP Simard
b41092a65c
update SourceKitten to master
2015-11-29 21:56:54 -08:00
JP Simard
717b36ca0c
print terminating newline from queuedPrint
2015-11-20 23:40:12 -08:00
JP Simard
e0df8df817
Merge pull request #216 from realm/jp-queue-logs
...
Fix an issue where logs would be printed asynchronously
2015-11-18 08:21:07 -08:00
JP Simard
173c0058ca
Merge pull request #217 from crimsonwoods/fix_issue_213_wrong_line_number_is_detected
...
Fix an issue: wrong line number and/or index is reported
2015-11-17 19:44:57 -08:00
crimsonwoods
4806e31f23
Rename lineAndCharacterForByteOffset to lineAndCharacterForCharacterOffset.
...
According to a change 247f02eff4 ,
method name should be changed.
2015-11-18 12:05:08 +09:00
JP Simard
306a80a00a
Fix an issue where logs would be printed asynchronously. Fixes #200 .
2015-11-17 18:15:13 -08:00
crimsonwoods
247f02eff4
Issue fix #213 : offset parameter should be used as a character-offset, not a byte-offset.
2015-11-18 10:42:30 +09:00
JP Simard
73896ee04c
add force try rule
2015-11-17 16:51:37 -08:00
JP Simard
ecb2a8bee5
refactor variable name rules
2015-11-17 16:13:06 -08:00
JP Simard
c31f33b49e
check isEmpty rather than test count against zero
2015-11-17 13:17:24 -08:00
JP Simard
d269bde1fa
allow trailing semicolons in comments
2015-11-17 11:41:02 -08:00
JP Simard
4a5ac44897
add SyntaxKind.commentAndStringKinds()
2015-11-17 10:11:04 -08:00