Norio Nomura
2a0ac455bc
'flatMap' is deprecated: renamed to 'compactMap(_:)'
2018-04-08 13:28:09 +09:00
Norio Nomura
7d0f239e2a
Update dependencies
...
- Update SourceKitten from 0.19.1 to 0.20.0
- Update SWXMLHash from 4.3.6 to 4.6.0
- Update Yams from 0.5.0 to 0.7.0
2018-04-08 13:28:08 +09:00
Frederick Pietschmann
fdbc391e52
Improve all keyword-related code
...
As per PR #2095 review, suggested by @marcelofabri
2018-03-21 07:42:46 +01:00
Frederick Pietschmann
0ad2488d7e
Add all keyword
2018-03-21 07:42:46 +01:00
Marcelo Fabri
5eb48d69b7
Merge pull request #2030 from mshibanami/ignoring_functions_of_line_length
...
Fix ignores_function_declarations of line_length doesn't work in some cases
2018-02-03 23:05:53 -08:00
Manabu Nakazawa
9677c92285
Fix ignores_function_declarations of line_length doesn't work in some cases
2018-02-04 15:44:35 +09:00
Marcelo Fabri
03b4d6b020
Fix violations introduced when linting with Swift 4.1
...
Part of #2021
2018-02-03 22:23:48 -08:00
Marcelo Fabri
0be8c855d2
Move functions to properties and Sets instead of Arrays
2017-10-04 14:34:00 -07:00
JP Simard
c57c47d66f
Remove unnecessary Swift version differences
2017-10-04 13:49:40 -07:00
Marcelo Fabri
81f90e6326
Add custom rule to enforce using queuedFatalError
2017-10-01 20:05:46 -03: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
d21262d1bc
Ignore SwiftLint commands in file_header rule
...
Fixes #1810
2017-09-30 00:29:23 -03:00
JP Simard
5c1c9389c7
produce an error when a 'disable' command doesn't silence any rules
2017-08-20 23:27:48 +02: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
441bece9da
Add extension_access_modifier rule
2017-06-02 21:24:55 +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
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
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
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
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
rakaramos
23a0d53424
Merge branch 'master' of github.com:realm/SwiftLint
2017-01-10 10:12:28 -02: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
da555b8a3b
minor spacing fixes
2016-12-30 18:21:11 -08:00
Marcelo Fabri
c6ac9b919c
Add redundant_void_return rule
...
Fixes #1066
2016-12-26 01:01:04 -02:00
Marcelo Fabri
608a2725c8
Add class_delegate_protocol rule
...
Fixes #1039
2016-12-23 02:37:44 -02:00
Marcelo Fabri
b18c98084c
Fix existing violations
2016-12-22 11:57:06 -02:00
Marcelo Fabri
23a0b03fe8
Fixing violations
2016-12-19 21:20:58 -02:00
Marcelo Fabri
3f6ca7611a
Fix violations
2016-12-19 20:08:17 -02:00
JP Simard
8b49cd36b5
Merge pull request #967 from marcelofabri/void-return-rule
...
Void return rule
2016-12-13 12:04:01 -08:00
JP Simard
3f7c010be8
fix specifying multiple rule identifiers in comment commands
2016-12-13 08:55:05 -08:00
Marcelo Fabri
7af7eb8fbe
Handling curried declarations
2016-12-13 11:57:43 -02:00
JP Simard
31814c36c4
set result of two methods to _ to avoid warnings on Linux
...
also filed https://github.com/apple/swift-corelibs-foundation/pull/740
and https://github.com/apple/swift-corelibs-foundation/pull/741
to fix upstream
2016-12-11 14:04:49 -08:00
JP Simard
0faf567931
use bridge() rather than explict or implicit casts
...
this is a step in aligning the code to compile on both Darwin and
Linux
2016-12-11 13:47:44 -08:00
Marcelo Fabri
0afe9a8b19
Enabling more rules in SwiftLint itself
2016-12-10 19:12:40 -02:00
Marcelo Fabri
13b0cfe623
Fixing inconsistencies
2016-12-08 18:29:57 -02:00
JP Simard
a57526d639
omit 'self.' references when not ambiguous
2016-12-08 01:25:54 -08:00
JP Simard
19fad01b29
make all enum members lowercase to comply with Swift 3 API Guidelines
2016-12-01 22:16:21 -08:00
JP Simard
39e1001629
make lots of Swift 3 related changes
...
many of which are to help with otherwise very long compile times
2016-12-01 00:34:29 -08:00
Norio Nomura
7c12a63e8f
Merge commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34' into swift3.0
...
* commit '58eb0f69c4055bb2cb89b3df278eca6ce0fb1c34':
generally clean up usage of swiftlint comment commands
update README to reflect the ability to specify multiple rules in commands
add changelog entry
allow specifying multiple rule identifiers in comment commands
# Conflicts:
# Source/SwiftLintFramework/Extensions/NSRegularExpression+SwiftLint.swift
# Source/SwiftLintFramework/Models/Command.swift
# Source/SwiftLintFramework/Rules/LegacyNSGeometryFunctionsRule.swift
# Tests/SwiftLintFrameworkTests/ConfigurationTests.swift
# Tests/SwiftLintFrameworkTests/IntegrationTests.swift
2016-11-30 18:42:40 +09:00