Commit Graph

44 Commits

Author SHA1 Message Date
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
Marcelo Fabri 50535e7e5c Refactor regex functions to accept options
Fixes #1127
2017-01-06 21:04:15 -02:00
Marcelo Fabri 68ee2008af Fixing existing violations 2016-12-22 00:09:27 -02:00
Marcelo Fabri 5cccc12eb7 Style changes because of the 120 length limit 2016-12-20 12:10:11 -02:00
Marcelo Fabri b565b0624e Fix a crash in statement_positing with multi-byte emoji 2016-12-18 01:07:51 -02:00
Marcelo Fabri 9e4d464e45 Add violation markers in rules 2016-12-18 01:07:51 -02:00
JP Simard d8cdad852a clean up regex code in StatementPositionRule.swift 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
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 b7862b9f6a Merge commit 'e0cafea80ffba746a103d8d5a25be8fcd0993c81' into swift3.0
* commit 'e0cafea80ffba746a103d8d5a25be8fcd0993c81':
  remove unnecessary file.invalidateCache()
  add changelog entry for #893
  fix up indentation in MarkRule.swift
  omit self if it can be inferred
  Corrections for mark rule
  Update regex part to be more precise.
  Add autocorrection to MarkRule

# Conflicts:
#	Source/SwiftLintFramework/Rules/ConditionalReturnsOnNewline.swift
#	Source/SwiftLintFramework/Rules/MarkRule.swift
#	Source/SwiftLintFramework/Rules/StatementPositionRule.swift
2016-11-30 22:26:51 +09:00
Norio Nomura 84ca11b6aa Merge commit 'b22d1a93c93537acde79a2496031012489fe270d' into swift3.0
* commit 'b22d1a93c93537acde79a2496031012489fe270d':
  Updating CHANGELOG entry
  Updates existing code to respect TrailingCommaRule
  Add configuration to enforce/forbid trailing comma
  Fixing rebase
  Addded TrailingCommaRule
2016-11-30 19:38:31 +09:00
JP Simard 4bb23dd75a omit self if it can be inferred 2016-11-28 22:18:56 -08:00
Marcelo Fabri d8fd865491 Updates existing code to respect TrailingCommaRule 2016-11-25 23:52:07 -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 21e3439bfa Merge pull request #766 from masters3d/no-autocorrect-disabled-rules
Added disable rule test to autocorrect
2016-10-29 14:09:11 +09:00
Brian Lu 21c4303bad Fix "Statment" typos 2016-10-21 21:07:37 -04: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
JP Simard 7f1d44d868 minor tweaks to #688 2016-06-10 09:14:52 -07:00
Michael Skiba b2ad5fc5fb Code Review Updates
- renamed "standard" to "default"
- Updated formatting per code review
- added note to changelog
2016-06-09 21:57:35 -04:00
Michael Skiba d0247a382f added autocorrect support to the uncuddled else rule 2016-06-09 14:37:09 -04:00
Michael Skiba 7a56338eb0 uncuddled else folded into statement position
still needs autocorrect
2016-06-09 14:35:34 -04:00
JP Simard c66c5c8df0 formatting fixes
found running `swiftlint autocorrect --format`
2016-05-29 14:58:28 -07: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 f4105b4502 fix inconsistencies between violations & corrections in StatementPositionRule 2016-02-07 10:13:27 -08:00
Scott Hoyt f722bcf360 All Rules (with the exception of MissingDocs) now provide some severity configuration. 2016-01-23 17:42:13 -08:00
Scott Hoyt 9b6f3070a3 Wrote ConfigurableRule, made ParameterizedRule's conform, moved configuration into rules themselves. 2016-01-11 11:21:49 -08:00
Raphael Randschau 02834c89c0 StatementPositionRule is a correctable rule 2016-01-07 20:02:51 +01: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 96a4e6cc2f remove init() from Rule. 2015-11-29 21:43:53 -08:00
JP Simard 9be89a686e fix inappropriate uses of flatMap where we should be using map 2015-11-27 17:32:21 -08:00
JP Simard 9276ec178d fix statement position rule false positives. fixes #237. 2015-11-26 11:23:25 -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
JP Simard 4a5ac44897 add SyntaxKind.commentAndStringKinds() 2015-11-17 10:11:04 -08:00
JP Simard 0335f155ab Perform major refactor of rule description, identifiers and examples
Fixes #183.
2015-11-04 12:24:33 -08:00
JP Simard 5cb80cfd22 All rules now print their identifiers in reports. Fixes #180. 2015-11-04 10:30:36 -08:00
Alex Culeva aa1fc70c9c Add StatementPosition rule 2015-11-03 22:27:26 +02:00