Commit Graph

1181 Commits

Author SHA1 Message Date
JP Simard f0006fe9a3 rename VerticalWhitespaceRule.internalValidate(file:)
to violatingLineSections(in:)
2017-01-09 20:31:06 -08:00
JP Simard c1be9cdd21 use 'guard shouldMakeViolation' 2017-01-09 20:28:06 -08:00
JP Simard 9a0bd3afc2 move extractCallsToSuper to Dictionary extension 2017-01-09 20:24:46 -08:00
JP Simard 40e6272f90 make reduceSwitchComplexity's first argument label more explicity 2017-01-09 19:46:35 -08:00
JP Simard 7522635ad8 update SwiftLintFramework/Rules to follow Swift 3 API Design Guidelines 2017-01-09 19:37:53 -08:00
JP Simard 00cd61ab17 update SwiftLintFramework/Reporters to follow Swift 3 API Design Guidelines 2017-01-09 19:31:19 -08:00
JP Simard a98b0c0070 address some PR feedback 2017-01-09 19:28:08 -08:00
JP Simard 9e7cdc3282 update SwiftLintFramework/Protocols to follow Swift 3 API Design Guidelines 2017-01-09 19:19:25 -08:00
JP Simard 1e48ffb8fc address some PR feedback 2017-01-09 19:17:27 -08:00
JP Simard c5c2e21120 update SwiftLintFramework/Models to follow Swift 3 API Design Guidelines 2017-01-09 19:05:29 -08:00
JP Simard dbd50c0f1d address some PR feedback 2017-01-09 18:55:28 -08:00
JP Simard 93bf35824e address some PR feedback 2017-01-09 18:54:11 -08:00
JP Simard a291bb594a update SwiftLintFramework/Extensions to follow Swift 3 API Design Guidelines 2017-01-09 17:53:07 -08:00
JP Simard 7fb1875613 move CommandAction and CommandModifier into Command type
and make Command.modifier private
2017-01-09 16:25:19 -08:00
JP Simard 1c55cc8cf5 don't swallow errors in YamlParser.parse(_:) 2017-01-09 16:25:19 -08:00
JP Simard 3f13da32f0 remove FooTest class 2017-01-09 16:25:19 -08:00
JP Simard c06a9a7b02 add empty newline between properties and init 2017-01-09 16:25:18 -08:00
Marcelo Fabri 0f64ef2992 Fix false positive on vertical_parameter_alignment rule
Fixes #1129
2017-01-09 20:03:12 -02:00
JP Simard 9d697bf7a2 add .swiftlintVersion member to validKeys 2017-01-07 00:13:48 -08:00
JP Simard 6979d25733 allow specifying a swiftlint_version configuration key
which will log a warning if the current running version of SwiftLint
is different than this value.
2017-01-07 00:09:29 -08:00
JP Simard a16e77c39e fix swiftlint version with SPM
all done by @marcelofabri, originally in #1073
2017-01-07 00:09:27 -08:00
JP Simard c2a26c37d5 Merge pull request #1133 from dduan/more_ints_in_valid_ibdesignable
Permit more Int types in valid_ibinspectable
2017-01-06 20:03:51 -08:00
Daniel Duan 63fa98932e Permit more Int types in valid_ibinspectable
Unsigned and/or explicitly-sized integer types are valid with `@IBInspectable`.
SwiftLint should not produce lint warnings againt these.
2017-01-06 18:17:45 -08:00
Marcelo Fabri 50535e7e5c Refactor regex functions to accept options
Fixes #1127
2017-01-06 21:04:15 -02:00
Marcelo Fabri 8a6b2d8570 Merge pull request #1123 from marcelofabri/shorthand_operator
Add shorthand_operator rule
2017-01-06 20:56:21 -02:00
JP Simard a4b10ee5ae Merge pull request #1126 from realm/jp-swift-directories
fix linting directories ending in `.swift`
2017-01-06 13:48:22 -08:00
Marcelo Fabri 136b424778 Small refactoring 2017-01-06 18:06:28 -02:00
Marcelo Fabri ebec3b5128 Handle more cases 2017-01-06 18:02:02 -02:00
Marcelo Fabri 5d6c2ec3e7 Add shorthand_operator rule
Fixes #902
2017-01-06 18:02:02 -02:00
JP Simard 36b1ea0ba4 fix linting directories ending in .swift 2017-01-06 11:33:21 -08:00
JP Simard 1aa69f8a4f Merge pull request #1007 from jaherhi/line_length_url
Add check to ignore urls for line_length rule
2017-01-06 10:41:17 -08: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
Javier Hernández cf2c7ced39 Move method to strip urls to String extension 2017-01-06 01:05:54 +01:00
Javier Hernández d58d26f526 Use regex to cache the regular expression 2017-01-06 01:05:54 +01:00
Javier Hernández 384c7a8507 Use NSRegularExpression to fix the rule on Linux 2017-01-06 01:05:54 +01:00
Javier Hernández e87ecc684a Add import to fix tests running with SPM 2017-01-06 01:05:54 +01:00
Javier Hernández ed42d9b38e Add line length configuration to ignore urls 2017-01-06 01:05:54 +01:00
Javier Hernández 2c82458426 Add check to ignore urls for line_length rule 2017-01-06 01:05:54 +01:00
JP Simard dc82a5473c Merge pull request #1112 from VojtaStavik/correctable-nimble-operator-rule
Make NimbleOperatorRule correctable
2017-01-05 07:08:23 -08:00
Vojta Stavik f4bc2288e7 Remove labeled loops, better formatting 2017-01-05 11:20:20 +01:00
Aaron McTavish 00b8e79318 Add max_empty_lines config to vertical_whitespace
Update `vertical_whitespace` rule to allow configuration of the number
of consecutive empty lines before a violation using `max_empty_lines`.
The default value is still 1 line.
2017-01-05 10:05:03 +00:00
Marcelo Fabri 6d4dd49902 PR feedback 2017-01-05 00:41:11 -02:00
Marcelo Fabri 5ca89f270e Refactor split to use String.components(separatedBy:) 2017-01-05 00:41:11 -02:00
Marcelo Fabri 5a22c71ccb PR feedback 2017-01-05 00:41:11 -02:00
Marcelo Fabri fdfb424eff Add support to generic typealias 2017-01-05 00:41:11 -02:00
Marcelo Fabri 4fb8fd84c0 Support generic enum 2017-01-05 00:41:11 -02:00
Marcelo Fabri 0c0780188e Applying hack on Linux 2017-01-05 00:41:11 -02:00
Marcelo Fabri dd59f4e9f9 Add generic_type_name rule
Fixes #51
2017-01-05 00:41:11 -02:00
Marcelo Fabri 6e97d760bc PR feedback 2017-01-04 21:30:59 -02:00