Stéphane Copin
97c1dcd0fa
Add support for nested configuration
...
Original commit here: https://github.com/realm/SwiftLint/commit/9eef125245e43a8ff333d45abd13f9f0177d7258
Significant modifications made by @jpsim
2017-08-02 13:05:26 -07:00
Marcelo Fabri
70fc1a197d
Ignore shebang in all rules
...
By making a creative use of regions.
Fixes #1294 .
2017-07-26 00:24:23 +02:00
Marcelo Fabri
0bf1179c83
Validating trailing closure even if there's only one param
2017-07-24 00:50:31 +02:00
Marcelo Fabri
374731d92f
Fix mark rule corrections generating invalid code in some cases
...
Apparently, we never invalidated the file cache when autocorrecting 😬
2017-07-23 02:08:15 +02:00
Marcelo Fabri
c01f4bd19f
Enable extension_access_modifier rule
2017-07-21 21:08:52 +02:00
JP Simard
41513a55d5
fix compilation with Swift 3.2
2017-07-17 15:37:08 -07:00
JP Simard
40bd4e7d4f
move parsing functionality to Configuration+Parsing
2017-07-17 12:05:05 -07:00
JP Simard
e6f95d5723
move merging functionality to Configuration+Merging
2017-07-17 12:05:04 -07:00
JP Simard
8f8e5d1fc2
move "lintable files" functionality to Configuration+LintableFiles
2017-07-17 11:45:32 -07:00
JP Simard
6b8d2ba28a
move Configuration+Cache.swift into Extensions/
2017-07-17 11:42:05 -07:00
JP Simard
7acacf6bdb
update dependencies, mostly for SourceKitten 0.18
2017-07-12 10:11:27 -07:00
JP Simard
57d4dc7c52
change an empty #if body for #if !
2017-07-10 15:56:02 -07:00
JP Simard
e54dcae5b7
enable let_var_whitespace rule in SwiftLint itself
...
and refactor code in a few places to conform to the rule
2017-07-10 15:42:55 -07:00
Marcelo Fabri
561653bcb2
Use prefix(while:) instead of partitioned(by:)
2017-06-14 14:33:04 +02:00
Marcelo Fabri
441bece9da
Add extension_access_modifier rule
2017-06-02 21:24:55 +02:00
Marcelo Fabri
32e38c96cf
Add kinds(inByteRange:)
2017-05-25 04:55:47 +02:00
JP Simard
592537966c
make Region & Command structs conform to Equatable
2017-05-24 11:33:39 -07:00
JP Simard
bb50a4e8e5
fix overlapping commands causing incorrect Region generation
...
fixes #1388
2017-05-23 13:38:24 -07:00
JP Simard
201a74ef0b
recursively call extractCallsToSuper(methodName:)
2017-05-23 10:26:13 -07:00
JP Simard
923f38c11b
simplify FileManager.modificationDate(forFileAtPath:) impl
2017-05-18 13:59:24 -07:00
Víctor Pimentel
5ed010c9c0
Change LinterCache to use file modification dates instead of hashing files with a weak algorithm.
2017-05-18 13:39:05 -07:00
JP Simard
04824c9b51
move 'AccessControlLevel.swift' from 'Extensions' to 'Models'
2017-05-16 10:58:49 -07:00
Marcelo Fabri
d73ee8d3d9
Remove Swift 2 support
...
Also removes `missing_docs` and `valid_docs` rules.
Fixes #1453 .
2017-04-23 13:43:41 +02:00
Norio Nomura
a3d6a4295d
NSRegularExpression is added on Linux
2017-04-17 17:22:54 +09:00
Daniel Rodríguez Troitiño
c29cf9a4d0
Avoid pattern matching false positives
...
The rule for unused optional binding was false triggering for pattern matching where the associated value was just an underscore. Additionally, pattern matching mixed with unused optional binding was not triggering in some cases.
New non triggering and triggering examples have been added for the failing cases, and new regular expressions are used to catch all the cases.
Modify the code in `File+SwiftLint` to expose full `NSTextCheckingResult` (and not just ranges) and rewire some pieces to use the new functions.
Fixes #1376
2017-04-06 14:16:12 -07:00
Keith Smiley
b410c9376a
Update optional interpolated strings for Xcode 8.3
2017-04-06 13:37:49 -07:00
Norio Nomura
b5cba7ae40
Replace YamlSwift with Yams
2017-04-03 09:16:04 +09:00
JP Simard
34f40c861f
make regex cache thread-safe
2017-03-09 12:10:40 -08:00
Marcelo Fabri
f90b25e2e1
Refactor elements to not be optional
2017-02-09 17:59:31 -08:00
JP Simard
8c4bfcc58d
Merge branch 'master' into identifier-rule
...
* master: (44 commits)
make valid_docs rule opt-in
update LineLengthConfiguration.consoleDescription after #1264
small refactoring after #1264
fix for_where violation in CompilerProtocolInitRule.swift
Add for_where rule
explicitly set podspec dependency versions
Add changelog entry
Fix existing violations
Navigate substructure even for different kinds
Small style changes
Modified so that kinds(forByteOffset:) does not require a separate filter() setup of the results
Changes from PR feedback. Long comments following code in a line will now trigger, configuration will now fail if invalud value types are set for options
Fix false positive on large_tuple when using generics inside a tuple
fix wording in changelog
disable docs rules in Swift 2.3 and later
Fix deadlock when stderr fills up OS buffer
small Danger/oss-check improvements
Fix links
Fix cleanup
Always use Xcode reporter on oss-check
...
2017-02-09 15:50:06 -08:00
JP Simard
69f885cf08
small refactoring after #1264
2017-02-09 14:42:09 -08:00
Marcelo Fabri
2300ae3daf
Small style changes
2017-02-06 21:59:30 -02:00
Michael Welles
15a7a88297
Modified so that kinds(forByteOffset:) does not require a separate
...
filter() setup of the results
2017-02-06 15:58:45 -05:00
Michael Welles
7d48153d4a
fixed merge conflicts
2017-02-06 15:38:19 -05:00
Michael Welles
c9ff0aa07f
Changes from PR feedback. Long comments following code in a line will now trigger, configuration will now fail if invalud value types are set for options
2017-02-06 15:33:44 -05:00
JP Simard
a01cb69a83
disable docs rules in Swift 2.3 and later
2017-02-03 14:42:11 -08:00
Michael Welles
cd843e7fcd
Added "ignores_comments" and "ignores_function_declarations" as boolean options to LineLengthRule
2017-01-30 17:51:56 -05:00
Marcelo Fabri
8715b913de
PR feedback
2017-01-23 21:38:56 -02:00
Marcelo Fabri
44c55f4bde
VariableNameRule is now IdentifierNameRule
2017-01-23 21:38:56 -02:00
JP Simard
29cdc86185
add some convenience members to SourceKit dictionaries
2017-01-22 11:00:57 -08:00
Marcelo Fabri
e6155ea76e
Fix excluded configuration not excluding files.
...
Fixes #1166
2017-01-12 00:36:59 -02:00
JP Simard
92c5a11303
Merge pull request #1119 from rakaramos/master
...
Add Unused optional binding rule
2017-01-10 14:19:05 -08:00
rakaramos
23a0d53424
Merge branch 'master' of github.com:realm/SwiftLint
2017-01-10 10:12:28 -02:00
JP Simard
9a0bd3afc2
move extractCallsToSuper to Dictionary extension
2017-01-09 20:24:46 -08:00
JP Simard
a291bb594a
update SwiftLintFramework/Extensions to follow Swift 3 API Design Guidelines
2017-01-09 17:53:07 -08:00
rakaramos
147bfd6d5b
Use range parameter if exists
2017-01-09 13:14:21 -02:00
Rafael Machado
14ea8a22d5
Add range to avoid whole file lookup
2017-01-07 16:28:04 -02:00
Marcelo Fabri
50535e7e5c
Refactor regex functions to accept options
...
Fixes #1127
2017-01-06 21:04:15 -02:00
JP Simard
1c0e0b7b61
use NSString.isSwiftFile() instead of hasSuffix(".swift")
2017-01-05 20:43:04 -08:00
JP Simard
43a56ffa85
use FileManager.DirectoryEnumerator to implement filesToLintAtPath(...)
2017-01-05 18:08:29 -08:00