Commit Graph

65 Commits

Author SHA1 Message Date
Marcelo Fabri f90b25e2e1 Refactor elements to not be optional 2017-02-09 17:59:31 -08:00
JP Simard 29cdc86185 add some convenience members to SourceKit dictionaries 2017-01-22 11:00:57 -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 9e7cdc3282 update SwiftLintFramework/Protocols to follow Swift 3 API Design Guidelines 2017-01-09 19:19:25 -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 8ce031ff5f add substructure member to Dictionary+SwiftLint.swift 2016-12-23 12:35:01 -08:00
Marcelo Fabri 09d031dc3e PR feedback 2016-12-22 00:14:34 -02:00
Marcelo Fabri f7cb7bae2c PR feedback 2016-12-22 00:09:27 -02:00
Marcelo Fabri fdff7b1dac Closure end indentation 2016-12-22 00:09:27 -02:00
Marcelo Fabri b4ae1eccbe Make dictionary colon correctable 2016-12-22 00:09:27 -02:00
Marcelo Fabri 666373dce6 Add more tests 2016-12-22 00:09:27 -02:00
Marcelo Fabri 1d06302643 Add dictionary colon validation to colon rule
Fixes #603
2016-12-22 00:09:27 -02:00
Marcelo Fabri 9e4d464e45 Add violation markers in rules 2016-12-18 01:07:51 -02:00
Marcelo Fabri cbccb0ec24 Fix violations 2016-12-15 19:32:53 -02: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 13b0cfe623 Fixing inconsistencies 2016-12-08 18:29:57 -02:00
JP Simard 19fad01b29 make all enum members lowercase to comply with Swift 3 API Guidelines 2016-12-01 22:16:21 -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
Norio Nomura e922e08c5b Merge commit '6ffab45c2b6ee9c3532afa2f647d34daf320be1d' into swift3.0
* commit '6ffab45c2b6ee9c3532afa2f647d34daf320be1d':
  Fix severity configuration in ColonRule

# Conflicts:
#	Source/SwiftLintFramework/Rules/ColonRule.swift
2016-11-30 17:44:49 +09:00
JP Simard e93eee31e7 generally clean up usage of swiftlint comment commands
used within the codebase itself.
2016-11-25 13:10:38 -08:00
Marcelo Fabri 3963499103 Fix severity configuration in ColonRule
Fixes #863
2016-11-24 11:17:41 -02:00
Norio Nomura 40828dff03 Merge branch 'master' into swift3.0
* master: (41 commits)
  Fix formatting in CHANGELOG.md
  release 0.13.0
  Update CHANGELOG.md
  Fix check for trailing whitespace to return early
  Fix checks for some inline comments
  Replace check for comments to use SyntaxKind
  Add configuration for trailing_whitespace to ignore comments
  Unwanted space removed
  - Lint issues fixed
  Updated HTML Reporter
  PR feedback
  Add check on autocorrect for disabled range
  Use `utf8.count` instead of `utf16.count` to byte range
  Re-write `ExplicitInitRule` to `ASTRule`
  added ExplicitInitRule
  Updated CHANGELOG
  HTML Reporter added
  HTML Reporter added
  Adds information about SwiftLint plugin for AppCode into README.md
  added reasons why a new rule should be opt in
  ...

# Conflicts:
#	Source/SwiftLintFramework/Extensions/File+SwiftLint.swift
#	Source/SwiftLintFramework/Extensions/Structure+SwiftLint.swift
#	Source/SwiftLintFramework/Rules/ColonRule.swift
#	Source/SwiftLintFramework/Rules/CommaRule.swift
#	Source/SwiftLintFramework/Rules/LegacyCGGeometryFunctionsRule.swift
#	Source/SwiftLintFramework/Rules/LegacyConstantRule.swift
#	Source/SwiftLintFramework/Rules/LegacyConstructorRule.swift
#	Source/SwiftLintFramework/Rules/LegacyNSGeometryFunctionsRule.swift
#	Source/SwiftLintFramework/Rules/LineLengthRule.swift
#	Source/SwiftLintFramework/Rules/OperatorFunctionWhitespaceRule.swift
#	Source/SwiftLintFramework/Rules/ReturnArrowWhitespaceRule.swift
#	Source/SwiftLintFramework/Rules/RuleConfigurations/StatementPositionConfiguration.swift
#	Source/SwiftLintFramework/Rules/StatementPositionRule.swift
#	Source/SwiftLintFramework/Rules/TrailingWhitespaceRule.swift
#	Tests/SwiftLintFramework/RuleConfigurationTests.swift
2016-11-04 21:40:56 +09:00
Norio Nomura 3ff76e7ce8 Update SourceKitten 2016-11-04 20:24:21 +09:00
Norio Nomura 1c53118692 Use Any instead of AnyObject 2016-10-13 21:28:35 +09:00
Norio Nomura 8bf15f1dba Migrate to Swift 3.0 2016-10-09 01:09:50 +09:00
J Cheyo Jimenez 48a085cfc1 Added disable rule test to autocorrect 2016-08-30 15:41:17 -07:00
J Cheyo Jimenez 651351e3bd fix for verticalspace regex bug 2016-08-28 21:43:42 -07:00
freak4pc c963aad389 Fixed flexible_right_spacing to Bool instead of Int. 2016-07-28 09:35:29 +03:00
freak4pc 3a5eedfa5a ColonRule allows setting flexible_right_spacing.
Resolves issue realm/SwiftLint#730.
2016-07-26 23:21:45 +03:00
JP Simard 144495306b rename rule configurations to expand "Config" to "Configuration" 2016-02-12 10:53:36 -08:00
JP Simard 6befe7e5a4 expand many instances of "config" to "configuration" 2016-02-12 10:53:36 -08:00
JP Simard 3f4b993847 rename ConfigProviderRule to ConfigurationProviderRule 2016-02-12 10:53:36 -08:00
JP Simard 7d0afb190b rename matchAndTokensPattern to rangesAndTokensMatching
also align regex pattern comments & fix indentation
2016-02-10 15:42:07 -08:00
Norio Nomura 83c008507b Improve performance of ColonRule
The duration of `ColonRule` on linting Carthage 0.13 is reduced from 1673ms to 515ms by Instruments.
2016-02-10 15:16:21 -08:00
Norio Nomura 57025565d5 Improve performance of ColonRule
The duration of `ColonRule` on linting Carthage 0.11 is reduced from 2287ms to 1581ms by Instruments.
2016-01-30 22:10:38 +09:00
Scott Hoyt f722bcf360 All Rules (with the exception of MissingDocs) now provide some severity configuration. 2016-01-23 17:42:13 -08:00
JP Simard d5598d4eae add missing imports needed by SPM 2016-01-22 21:09:28 -08:00
JP Simard 4c52163a70 add rule to encourage checking isEmpty over comparing count to zero 2016-01-13 15:41:25 -08:00
Scott Hoyt 9b6f3070a3 Wrote ConfigurableRule, made ParameterizedRule's conform, moved configuration into rules themselves. 2016-01-11 11:21:49 -08:00
JP Simard 85d8c68978 test violation locations 2015-12-27 13:33:42 -05:00
JP Simard 8d529f1804 Fix multibyte handling in many rules 2015-12-24 20:59:15 -05:00
JP Simard b21ae55a3b small fixes after #283 2015-12-22 23:34:56 -05:00
Brian Partridge f8c1771a32 Review feedback. 2015-12-21 18:31:46 -05:00
Brian Partridge 9508fb1165 Add autocorrect for ColonRule. 2015-12-21 08:22:44 -05:00
JP Simard 008f85f3ac Fix issues with multi-byte characters. Fixes #234. 2015-12-03 14:49:44 -08:00
JP Simard 96a4e6cc2f remove init() from Rule. 2015-11-29 21:43:53 -08:00
JP Simard 989127cbe0 [StyleViolation] use RuleDescription's description when reason is nil
Many cases just used a static string that was nearly identical to the rule
description as the `reason` parameter when initializing a StyleViolation.
2015-11-17 10:25:57 -08:00
JP Simard 76b30ee19b make all rule descriptions follow a consistent format 2015-11-17 10:18:29 -08:00
Mickael Morier 528af41764 fix colon rule issue #135 2015-11-15 16:11:56 +01:00
JP Simard 0335f155ab Perform major refactor of rule description, identifiers and examples
Fixes #183.
2015-11-04 12:24:33 -08:00