JP Simard
8e12dbd81d
move ASTRule function implementations into a protocol extension
2015-11-04 15:39:29 -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
JP Simard
ae595d67ed
Release 0.3.0
2015-11-03 13:13:51 -08:00
JP Simard
3e53537882
Merge pull request #172 from S2dentik/statementPosition
...
Add Statement Position rule
2015-11-03 12:58:00 -08:00
JP Simard
233429365e
Merge pull request #179 from realm/jp-update-dependencies
...
update dependencies & lint parameter variables
2015-11-03 12:52:50 -08:00
JP Simard
c6800e1ace
update dependencies & lint parameter variables
2015-11-03 12:31:37 -08:00
Alex Culeva
aa1fc70c9c
Add StatementPosition rule
2015-11-03 22:27:26 +02:00
Alex Culeva
5af582ca53
Add Comma rule
2015-11-03 22:05:31 +02:00
JP Simard
5b34dabe30
Merge pull request #176 from zippy1978/master
...
Added rule reference on command output to enable batch processing
2015-11-03 11:25:23 -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
Alex Culeva
023466e843
Add OpeningBrace Rule
2015-11-03 11:06:16 +02:00
JP Simard
12f3c345a7
[CHANGELOG] add entry for #167
2015-11-02 15:05:05 -08:00
Gilles Grousset
0e9fad37db
Fixed compilation error with Travis CI
2015-11-01 22:33:28 +01:00
Gilles Grousset
f877af1720
Added rule id on RulesCommand and XcodeReporter
2015-11-01 02:16:34 +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
David Potter
8748a4f3a2
Add guard statements to nonTriggeringExamples and triggeringExamples and fix tests.
2015-10-23 19:11:44 -07:00
David Potter
94b7ebdf36
Add support for the guard statement to ControlStatementRule.
2015-10-23 18:40:56 -07:00
JP Simard
57177e018d
update RulesCommand to print identifiers but not examples
2015-10-19 12:53:48 -07:00
Daniel Beard
4339a281df
PR comments
2015-10-07 11:16:20 -07:00
Daniel Beard
64cd034503
Change TrailingNewLine violation line to have an index within the file
2015-10-07 11:06:19 -07:00
JP Simard
0fd573c8b2
Deduplicate files in the current directory. Fixes #154 .
2015-10-06 15:51:30 -07:00
JP Simard
9321dfd9a0
Merge pull request #152 from realm/jp-merge-lint-command-code-paths
...
Merge stdin/non-stdin code paths, only log reports to stdout, chunk json/csv reports
2015-10-05 12:48:05 -07:00
JP Simard
87cd144b8a
Merge stdin/non-stdin code paths, only log reports to stdout, chunk json/csv reports
2015-10-05 11:57:07 -07:00
Keith Smiley
8e00730bea
Update yaml parsing to allow single value configurations
...
This updates the `arrayOfStrings` and `arrayOfInts` methods to also
accept a single value if they are not parsed as an array. This lets us
do this for our configuration:
line_length: 110
Instead of:
line_length:
- 110
If we only actually need a single value. The same goes for source
directories and other string keys.
2015-09-30 17:01:59 -07:00
Keith Smiley
fb32e31f8d
Merge pull request #142 from realm/ks-update-rule-descriptions
...
Update rule descriptions to not include specifics
2015-09-30 16:08:21 -07:00
JP Simard
d8c791f4e9
Merge pull request #141 from realm/ks-remove-allrules
...
Remove allRules
2015-09-30 13:49:54 -07: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
Keith Smiley
e320b2e363
Remove allRules
...
Now that the Configuration struct is creating a list of rules based on
optional yaml, this list duplicates the same behavior. By removing it
you no longer have to maintain duplicate lists of rules.
2015-09-30 13:18:12 -07:00
Keith Smiley
60ed23c21e
Remove duplicated Line declaration
...
This typealias is public from sourcekitten, so we don't need to
redeclare it here.
2015-09-30 13:11:07 -07:00
JP Simard
a71c9fbf01
Release 0.2.0: Tumble Dry
2015-09-30 09:57:23 -07:00
JP Simard
51dd2481ca
keep it functional, yo!
2015-09-30 09:44:12 -07:00
JP Simard
25017c4ea4
[Configuration] allow configuring parameterized rules from the configuration file
2015-09-21 11:08:29 -07:00
JP Simard
3c090e101f
Merge pull request #133 from realm/jp-custom-reporters
...
added custom reporters: xcode (default), json, csv. fixes #42
2015-09-20 00:09:00 +02:00
JP Simard
1bec2bcb23
use XcodeReporter for StyleViolation's description
2015-09-20 00:01:36 +02:00
JP Simard
ee79209db8
added custom reporters: xcode (default), json, csv. fixes #42
2015-09-19 17:48:32 +02:00
JP Simard
75f4122f63
generalize TodoRule
2015-09-04 13:57:16 -07:00
JP Simard
3f3c6e550f
further generalized TodoRule
2015-09-04 13:46:57 -07:00
JP Simard
e947f58669
Generalize TodoRule
...
as prompted by my own recommendations... doh! https://github.com/realm/SwiftLint/pull/126#issuecomment-137846688
2015-09-04 13:46:57 -07:00
Keith Smiley
33aa47e117
Remove unnecessary first Region
2015-09-04 13:30:57 -07:00
JP Simard
f3a7eff1a0
don't use \h in regex
2015-09-03 16:29:23 -07:00
JP Simard
7dd5ee1b15
Allow newlines in function return arrow. This prevented SwiftLint from linting
2015-09-03 15:23:21 -07:00
Keith Smiley
1b2373c40c
Remove unused count of trailing string extension
...
This method isn't very performant because it reverses the entire string
for comparison.
2015-09-03 13:41:58 -07:00
Keith Smiley
7a6028f1dd
Optimize trailing whitespace rule
...
This updates the rule to no longer reverse each line in each file.
Instead the last character in each line is individually checked for
whitespace.
2015-09-03 13:41:58 -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
56fe7b0d3b
Merge pull request #111 from realm/jp-comment-commands
...
Disable/re-enable rules from within source code comments. Fixes #4 .
2015-08-31 17:03:03 -07:00
JP Simard
fe5f1affc9
ViolationSeverity is now only .Warning and .Error
2015-08-30 22:21:59 -07:00
JP Simard
7d85fe3261
converted Command/Region to structs and made Location Comparable
2015-08-29 21:45:55 -07:00
JP Simard
61d46c6c29
add tests for disabling rules via source code comments
2015-08-29 20:39:39 -07:00
JP Simard
fbc253a2ab
use single space in SwiftLint comment commands & fix issue with testTodoOrFIXME
2015-08-29 17:51:34 -07:00