Commit Graph

49 Commits

Author SHA1 Message Date
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
Marcelo Fabri 0be8c855d2 Move functions to properties and Sets instead of Arrays 2017-10-04 14:34:00 -07:00
Marcelo Fabri d4e2f91f34 Small changes and refactoring 2017-07-23 00:16:32 +02:00
Samuel Susla 84860461cb Ignore comment lines in file length rule 2017-07-23 00:16:32 +02:00
Marcelo Fabri e86763739f Move kind to RuleDescription 2017-07-02 15:50:16 +02:00
Marcelo Fabri 5012211d3d Add RuleKind 2017-07-02 15:50:16 +02:00
Marcelo Fabri fd231b607d Fix existing violations 2017-06-13 16:12:58 +02:00
Jeffrey a37445d068 Revert "We should be using parameter.value instead of configuration.warning in order to report accurate information about the violation."
This reverts commit c4006276a3.
2017-04-25 13:39:12 -07:00
Jeffrey c4006276a3 We should be using parameter.value instead of configuration.warning in order to report accurate information about the violation. 2017-04-24 18:28:40 -07:00
JP Simard 9e7cdc3282 update SwiftLintFramework/Protocols to follow Swift 3 API Design Guidelines 2017-01-09 19:19:25 -08:00
Marcelo Fabri ef8bc05b89 Update number_separator configuration in SwiftLint 2017-01-02 02:51:12 -02:00
Marcelo Fabri ca5914816f Enable more opt-in rules in SwiftLint 2017-01-02 01:59:34 -02:00
JP Simard f36e28e0a6 prefer 'joined()' over 'joined(separator: "")'
since that's the default separator.

Rule for this requested in #1093.
2016-12-30 10:30:03 -08:00
Marcelo Fabri 13b0cfe623 Fixing inconsistencies 2016-12-08 18:29:57 -02:00
Norio Nomura 8bf15f1dba Migrate to Swift 3.0 2016-10-09 01:09:50 +09: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 5cc6d3243a On SourceKitd failed, continue linting the file by limited rules that does not use SourceKitd
Add `RuleDescription.needsSourceKit` indicating the rule needs SourceKit.
If `ASTRule` or `needsSourceKit` is true, skip linting if SourceKitd fails.
2016-04-13 18:40:25 +09: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 4ae7f2fca9 use verifyRule to test FileLengthRule 2016-01-24 13:18:19 -08:00
Scott Hoyt 989bac7ec8 Renamed SeverityLevelConfig to SeverityLevelsConfig. 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 a64f9eddbd SeverityLevelConfig stores levels as Ints now. 2016-01-23 17:42:13 -08:00
Scott Hoyt 0691b79a08 Rename Rule Configurations. 2016-01-23 17:42:13 -08:00
Scott Hoyt 873edb724b Provided convenience property params for RuleLevelsConfig. 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 3a134b2338 Migrated FileLengthRule to ViolationLevelRule. 2016-01-13 19:45:27 -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 2300904500 update dependencies & make minor improvements to some rules 2015-11-15 14:53:41 -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
Gilles Grousset 7feb26ebe2 Refactored Rule reference in StyleViolation
Now uses a String with the rule identifier
2015-11-03 13:31:29 +01:00
Gilles Grousset 7328b41da8 Added rule reference to StyleViolation
- Added rule reference to StyleViolation
- Added rule_id field on JSONReporter and CSVReporter
2015-11-01 02:00:04 +01:00
Keith Smiley fa97ce073a Update rule descriptions to not include specifics
Now that configuration of rules has been added, having these hard coded
lengths is no longer valid.
2015-09-30 13:22:37 -07:00
JP Simard 25017c4ea4 [Configuration] allow configuring parameterized rules from the configuration file 2015-09-21 11:08:29 -07:00
Keith Smiley d12f9cc271 Move to SourceKitten's File lines
The new lines property on File is a cached version of the same lines.
This means we don't have to compute these multiple times during linting.
2015-09-03 11:50:50 -07:00
JP Simard fe5f1affc9 ViolationSeverity is now only .Warning and .Error 2015-08-30 22:21:59 -07:00
JP Simard e95625ee79 update for swift 2 2015-08-27 14:20:51 -07:00
JP Simard 26075a2d4f Trailing newline & file length violations are now displayed in Xcode: fixes #43 2015-05-28 12:11:13 -07:00
JP Simard 5402b8214e more minor changes to rules command 2015-05-25 15:37:38 -07:00
JP Simard a68a886d3f minor tweaks 2015-05-25 15:23:21 -07:00
Chris Eidhof e7a4e9f651 Rename examples from correct/failure to non-triggering and triggering 2015-05-25 14:46:14 -07:00
Chris Eidhof 20fd31672a List of all the rules 2015-05-25 14:46:13 -07:00
Chris Eidhof 89ea957b05 Changed RuleExample to be a struct 2015-05-25 14:46:13 -07:00
JP Simard e2df0546d3 Split Rule into Rule and ParameterizedRule protocols (fixes #21) 2015-05-20 18:27:16 +02:00
Aaron Daub 15a100153d Have the Rule protocol define its members as non-static so that we can pass around instances of Rule 2015-05-19 07:44:11 +02:00
JP Simard 9c81e13aec FileLengthRule 2015-05-18 05:29:04 +02:00