Commit Graph

173 Commits

Author SHA1 Message Date
Samuel Susla eb75ff52e4 add tests for mandatoryComma 2017-03-21 10:45:35 +01:00
Marcelo Fabri 0abc114895 Add redundant_discardable_let rule
Fixes #1232
2017-02-10 11:46:13 -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 f0c8fba3b6 Add for_where rule
Fixes #1228
2017-02-09 13:43:58 -08: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 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 ccc840b340 Changed LineLengthConfigurationFlag enum to be an OptionSet struct, per pull request feedback 2017-01-31 13:56:26 -05:00
Michael Welles 83a104d671 Reverted debugging code 2017-01-30 17:59:03 -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 c8e08181e0 Merge branch 'master' into identifier-rule 2017-01-25 12:17:05 -02:00
Marcelo Fabri 3800915e88 Swift 2.3 compatibility 2017-01-24 22:27:46 -02:00
Marcelo Fabri 46a2c25af4 Add notification_center_detachment rule
Fixes #1061
2017-01-24 22:27:45 -02:00
Marcelo Fabri 5c42f59595 Validate enum element only on Swift 3 2017-01-23 21:38:57 -02:00
Marcelo Fabri a150e2679c Updating test 2017-01-23 21:38:56 -02:00
Marcelo Fabri 44c55f4bde VariableNameRule is now IdentifierNameRule 2017-01-23 21:38:56 -02:00
Marcelo Fabri c891efc8d6 Add discarded_notification_center_observer rule
Fixes #1062
2017-01-23 21:38:33 -02:00
Marcelo Fabri dc2ebdf67c Extract number_separator tests to another class 2017-01-17 04:28:52 -02:00
Bjarke Hesthaven Søndergaard 0ad780eb50 Add tests 2017-01-16 22:30:53 +01:00
JP Simard 41251d8bb1 run LinterCacheTests on Linux 2017-01-10 15:47:45 -08:00
JP Simard 0530a2303f Merge branch 'master' into cache
* master:
  fix typos in ProjectMock configuration files
  update SourceKitten to 0.17
  build SwiftLint in release mode when running benchmarks
  run Circle CI's Xcode 8.2 image
  don't pass CI if Danger crashes
  Fix triggering example and add couple more
  Use range parameter if exists
  CHANGELOG entries must break at the 80th char
  Fix indentation
  Update CHANGELOG
  Delete extra variable
  Clean up code and improve overall logic
  Add range to avoid whole file lookup
  Clean up regex pattern
  Delete print command
  Fix test case clause
  Ignore tuples
  Append test to allTests array
  Add CHANGELOG entry
  Add UnusedOptionalBinding rule
2017-01-10 15:19:27 -08:00
JP Simard 92c5a11303 Merge pull request #1119 from rakaramos/master
Add Unused optional binding rule
2017-01-10 14:19:05 -08:00
JP Simard 75786ec941 fix typos in ProjectMock configuration files 2017-01-10 13:58:08 -08:00
Marcelo Fabri 94f48f4ebd PR feedback 2017-01-10 13:09:18 -02:00
Marcelo Fabri e1e2369c5f Merge branch 'master' into cache 2017-01-10 12:54:30 -02:00
rakaramos 23a0d53424 Merge branch 'master' of github.com:realm/SwiftLint 2017-01-10 10:12:28 -02:00
JP Simard 9e7cdc3282 update SwiftLintFramework/Protocols to follow Swift 3 API Design Guidelines 2017-01-09 19:19:25 -08:00
JP Simard c5c2e21120 update SwiftLintFramework/Models to follow Swift 3 API Design Guidelines 2017-01-09 19:05:29 -08:00
Marcelo Fabri 05d0a31865 Merge branch 'master' into cache 2017-01-09 23:53:59 -02:00
JP Simard a291bb594a update SwiftLintFramework/Extensions to follow Swift 3 API Design Guidelines 2017-01-09 17:53:07 -08:00
JP Simard af9331694c fix dictionary literal syntax style 2017-01-09 16:21:31 -08:00
Rafael Machado 8e5a63d1c0 Merge branch 'master' of github.com:realm/SwiftLint 2017-01-07 09:01:22 -02:00
Marcelo Fabri f89068e18a Merge branch 'master' into cache 2017-01-07 01:48:08 -02:00
Marcelo Fabri b1b9027663 Merge branch 'master' into cache 2017-01-06 21:06:50 -02:00
Marcelo Fabri 50535e7e5c Refactor regex functions to accept options
Fixes #1127
2017-01-06 21:04:15 -02:00
Rafael Machado 068b903d1c Merge branch 'master' of github.com:realm/SwiftLint 2017-01-06 19:53:25 -02:00
Marcelo Fabri 5d6c2ec3e7 Add shorthand_operator rule
Fixes #902
2017-01-06 18:02:02 -02: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 8f0ecd5109 reset assertion handler in test
specifically, after running testRulesWithFileThatCrashedSourceKitService.

otherwise, other tests could fail if they're linting the same file,
which can happen today if the integration tests happen to run afterwards.
2017-01-05 16:10:48 -08:00
Javier Hernández 7b3648899d Extract line length tests to their own test files 2017-01-06 01:08:50 +01:00
Javier Hernández cf2c7ced39 Move method to strip urls to String extension 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
Rafael Machado fe8b053cf4 Append test to allTests array 2017-01-05 21:25:45 -02:00
rakaramos da071774e0 Add UnusedOptionalBinding rule 2017-01-05 21:13:03 -02:00
Marcelo Fabri 903f43ba39 Merge branch 'master' into cache 2017-01-05 13:07:37 -02:00
Aaron McTavish 5c75180624 Remove redundant test of vertical_whitespace
As it is now in `VerticalWhitespaceRuleTests`. Per code review from
@marcelofabri
2017-01-05 14:08:52 +00: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 dd59f4e9f9 Add generic_type_name rule
Fixes #51
2017-01-05 00:41:11 -02:00
Marcelo Fabri c5db646115 Add large_tuple rule
Fixes #1065
2017-01-04 18:21:33 -02:00
Marcelo Fabri 66403ec5fa Handle other protocols 2017-01-04 15:34:19 -02:00