JP Simard
d269bde1fa
allow trailing semicolons in comments
2015-11-17 11:41:02 -08:00
JP Simard
0a2b9e8a54
add trailing semicolon rule
2015-11-17 10:46:26 -08:00
JP Simard
a45043bbaf
use verifyRule to test Trailing Newline rule
2015-11-17 10:44:30 -08:00
JP Simard
1048fb05e7
clean up Configuration.swift
2015-11-17 10:40:54 -08:00
JP Simard
66a8b4441d
minor improvements to the variable name family of rules
2015-11-17 10:30: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
JP Simard
4a5ac44897
add SyntaxKind.commentAndStringKinds()
2015-11-17 10:11:04 -08:00
JP Simard
8a30cb2e3d
organize Xcode project
...
make Extensions, Models & Protocols groups under SourceKittenFramework
2015-11-15 15:07:25 -08:00
JP Simard
2300904500
update dependencies & make minor improvements to some rules
2015-11-15 14:53:41 -08:00
JP Simard
6f643c4358
minor refactoring improvements
2015-11-15 14:28:33 -08:00
Mickael Morier
528af41764
fix colon rule issue #135
2015-11-15 16:11:56 +01:00
David Paschich
4af4909ad2
Filter out rules which don't exist rather than failing the configuration.
2015-11-12 20:55:07 -08:00
Keith Smiley
631bd965b4
Fix brace spelling error
2015-11-11 15:47:02 -08:00
Mickael Morier
8f1788ad5f
some refactor after code review
2015-11-11 21:20:51 +01:00
Mickael Morier
b18463154c
improve ControlStatementRule especially when several parentheses exists in condition and several bad cases appears
2015-11-11 16:36:47 +01:00
JP Simard
a73341e38d
[Configuration] fix whitespace
2015-11-10 14:10:43 -08:00
JP Simard
a96eb3a6ab
[Configuration] fix whitespace
2015-11-10 14:02:06 -08:00
JP Simard
2131613166
no longer trigger a nesting violation for enums one level deep. fixes #190
2015-11-10 08:58:53 -08:00
JP Simard
d36bf678a9
cut out some duplication in parameterRulesFromYAML
2015-11-07 11:14:40 -08:00
Mickael Morier
91aa913c62
add 2 new parameter rules to check min and max length of variable names and remove length check in VariableNameRule
2015-11-07 03:03:08 +01:00
Will Fleming
a70e4bd759
change VariableNameRule to allow capital static let
...
There is at least one semi-common case where capitalized names should
probably be allowed: in OptionSetType classes, the standard pattern is
to use `static let = Foo` to declare each option for the type.
Apple docs demostrating this:
https://developer.apple.com/library/prerelease/ios/documentation/Swift/Reference/Swift_OptionSetType_Protocol/index.html
One downside of this implementation is that it would *also* pass a
capitalized "static var Foo", which is probably not desirable. It's not
clear to me how feasible addressing this is: it seems like SourceKitten
might need to be updated to support this better? Using `static var` at
all is code smell, though, so hopefully this isn't a huge deal. Perhaps
there should even be a rule identifying `static var` and considering it
a violation?
2015-11-05 11:35:07 -05:00
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