Commit Graph

77 Commits

Author SHA1 Message Date
JP Simard 2eed8d469d Apply Marcelo Fabri's patch 2018-05-06 10:33:33 -07:00
John Szumski b03b4f0891 Added a new computed property that identifies whether a rule should treat multiple violations at the same location as only one violation. 2018-05-06 10:33:33 -07:00
JP Simard b83e0991b9 Remove all file headers
The MIT license doesn't require that all files be prepended with this
licensing or copyright information. Realm confirmed that they're ok with this
change. This will enable some companies to contribute to SwiftLint and the
date & authorship information will remain accessible via git source control.
2018-05-04 13:42:02 -07:00
Norio Nomura 2a0ac455bc 'flatMap' is deprecated: renamed to 'compactMap(_:)' 2018-04-08 13:28:09 +09:00
Tom Quist 9d75e39b3c * Added documentation for validate method in CallPairRule
* Made CallPairRule internal
* Fixed indentation of guard bodies
2017-11-07 08:41:40 +01:00
Tom Quist 7997192a70 Refactored ContainsOverFirstNotNilRule, FirstWhereRule and SortedFirstLastRule into new protocol CallPairRule to decrease code duplication 2017-11-07 00:23:10 +01:00
JP Simard a49835728b Speed up equality checks for [Rule] values 2017-10-19 22:28:04 -07: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 c01f4bd19f Enable extension_access_modifier rule 2017-07-21 21:08:52 +02:00
JP Simard e54dcae5b7 enable let_var_whitespace rule in SwiftLint itself
and refactor code in a few places to conform to the rule
2017-07-10 15:42:55 -07:00
JP Simard f639ae95f1 add CacheDescriptionProvider protocol
to provide more complete descriptions for cache invalidation
purposes.
2017-05-18 14:31:33 -07:00
Marcelo Fabri ac4ea29150 Navigate substructure even for different kinds 2017-02-06 22:04:05 -02:00
JP Simard 29cdc86185 add some convenience members to SourceKit dictionaries 2017-01-22 11:00:57 -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 8ce031ff5f add substructure member to Dictionary+SwiftLint.swift 2016-12-23 12:35:01 -08:00
Marcelo Fabri 5cccc12eb7 Style changes because of the 120 length limit 2016-12-20 12:10:11 -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
Michał Kałużny d97632e52d Add human readable reporter that’s also funny because emoji. 2016-12-07 23:13:59 -08: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
Johnykutty Mathew 6fb7ca1246 HTML Reporter added 2016-10-27 18:11:20 +05:30
Norio Nomura 8bf15f1dba Migrate to Swift 3.0 2016-10-09 01:09:50 +09:00
JP Simard fbe768ec3c assorted simplifications throughout the project 2016-08-21 18:36:16 -07:00
Matthew Ellis 07313c09a5 Add JUnit reporter 2016-07-22 20:50:58 +01:00
Norio Nomura 9c0a2492e8 Refactor ASTRule and add SourceKitFreeRule
- Make `ASTRule` to generic and remove `ASTBaseRule`
- Add `SourceKitFreeRule` and remove `RuleDescription.needsSourceKit`
2016-04-16 22:32:53 +09:00
Norio Nomura 39282654f4 Fix conditional_binding_cascade violations 2016-04-16 08:30:00 +09:00
Norio Nomura ad50e35c4e Add ASTBaseRule
`ASTBaseRule` takes kind as `String` for supporting other than `SwiftDeclarationKind`.
`ASTRule` inherits `ASTBaseRule`.
2016-04-16 08:30:00 +09:00
Norio Nomura e1e4923867 Use for Xcode 7.3 2016-04-07 23:17:11 +09:00
JP Simard b2d954f655 rename ConfigType to ConfigurationType 2016-02-12 10:53:36 -08:00
JP Simard 7e07e813ca rename RuleConfig to RuleConfiguration 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 d9cd1d670a rename Rule.init(config:) to Rule.init(configuration:) 2016-02-12 10:53:36 -08:00
JP Simard db71448c47 rename Rule.configDescription to Rule.configurationDescription 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 1866edae77 adjust access control levels for many APIs in SwiftLintFramework
this is done in an effort to stabilize the API for SwiftLint 1.0.
2016-02-10 17:26:06 -08:00
JP Simard 368ee9544a fold ConfigurableRule into Rule 2016-02-08 13:08:51 -08:00
JP Simard 71135c6a4b make RulesCommand show a configuration description for all rules 2016-02-07 10:40:51 -08:00
JP Simard c4ed26c05c allow passing an optional --reporter parameter to swiftlint lint 2016-02-06 11:14:23 -08:00
JP Simard b2a7b707ab print rule configuration 2016-02-03 10:31:53 -08:00
Scott Hoyt 6132d5d282 Provide default implementation for RuleConfig.isEqualTo when it is Equatable. 2016-01-23 17:42:13 -08:00
Scott Hoyt 943ed306a3 Modified names for brevity. 2016-01-23 17:42:13 -08:00
Scott Hoyt 3230c6413e Replaced things in rule configurations named configuration for config to save space. 2016-01-23 17:42:13 -08:00
Scott Hoyt 05a65afc72 Removed ViolationLeveLRule in favor of ConfigurationProviderRule. 2016-01-23 17:42:13 -08:00
Scott Hoyt 0b61c63937 Extracted Rule Configuration structs to own files. 2016-01-23 17:42:13 -08:00
Scott Hoyt 0883f56424 Rename Rule Configuration structures. 2016-01-23 17:42:13 -08:00
Scott Hoyt 6d385736c9 Delete unused ViolationLevelConfiguration protocol. 2016-01-23 17:42:13 -08:00
Scott Hoyt d2ec3fb621 Added associated type for ConfigurationProviderRule. 2016-01-23 17:42:13 -08:00
Scott Hoyt 619a3450c2 Fix spacing. 2016-01-23 17:42:13 -08:00
Scott Hoyt 1a2bb1be79 Add MinMaxConfiguration. 2016-01-23 17:42:13 -08:00
Scott Hoyt ccbcb537b5 Convert ConfigurableRule to throwing init instead of failing. 2016-01-23 17:42:13 -08:00