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
Michael Skiba
314f7db3e4
added base cuddled else rule
2016-06-09 14:35:34 -04:00
JP Simard
3ec8fee271
release 0.11.0
2016-06-08 15:30:33 -07:00
Norio Nomura
07f25eb00d
Fix minor wording
...
[ci skip]
2016-06-08 15:24:36 +09:00
Norio Nomura
fcd30c5b72
Skip checking existence of trailing comment in CommaRule if already violating
...
Fix #683
2016-06-08 15:10:10 +09:00
Norio Nomura
82fef3532a
Add failing test from #683 to CommaRule
2016-06-08 14:25:02 +09:00
JP Simard
5a640b4c32
simplify TrailingWhitespaceRule.validateFile
2016-06-07 14:55:39 -07:00
JP Simard
25b7dc5cd5
remove redundant Bool ? "true" : "false"
2016-06-07 14:48:40 -07:00
JP Simard
cb6d30f6d3
extract makeConfig() out of XCTestCase.verifyRule
2016-06-07 14:45:11 -07:00
Reimar Twelker
b92af7a8b2
Changed var to let
2016-06-07 14:15:32 -07:00
Reimar Twelker
2917d939d9
Reduced setting ignoresEmptyLines in applyConfiguration(_:) to a single line
2016-06-07 14:15:32 -07:00
Reimar Twelker
7d0cd39abd
Fixed line-length warning
2016-06-07 14:15:32 -07:00
Reimar Twelker
183e448530
Added severity to consoleDescription
2016-06-07 14:15:32 -07:00
Reimar Twelker
a6b9fb0304
Changed expected value of ignores_empty_lines setting to Bool
2016-06-07 14:15:32 -07:00
Reimar Twelker
7e56b46024
Changed to match the actual keyword used in the configuration file
2016-06-07 14:15:32 -07:00
Reimar Twelker
76656e17b5
Fixed line-length and trailing-whitespace warnings
2016-06-07 14:15:32 -07:00
Reimar Twelker
d8733e8830
Uses the new TrailingWhitespaceConfiguration type.
...
If the `ignoresEmptyLines` flag of the configuration is `true`, validation does not report and correction does not correct whitespace-indented empty lines.
2016-06-07 14:15:00 -07:00
Reimar Twelker
940b0c194e
Added a RuleConfiguration subclass specifically for the trailing whitespace rule.
...
Its `ignoresEmptyLines` flag controls whether the rule should ignore whitespace-indented empty lines when detecting violations and correcting files. By default, the flag is false.
2016-06-07 14:14:29 -07:00
JP Simard
c66c5c8df0
formatting fixes
...
found running `swiftlint autocorrect --format`
2016-05-29 14:58:28 -07:00
Andrew Rahn
e5047c459d
Disable the cascade warning when case is involved
...
This is a workaround that prevents invalid warning when the use of a case statement requires multiple let keywords for syntax
2016-05-24 23:48:47 -05:00
Jorge Bernal
548c21a187
Allow lowercase enum values
...
The Swift API Design Guidelines states that:
> Names of types and protocols are UpperCamelCase. Everything else is
> lowerCamelCase.
https://swift.org/documentation/api-design-guidelines/#follow-case-conventions
This PR changes `type_name` so it doesn't force enum values to UpperCamelCase.
2016-05-10 18:12:07 +02:00
Brian Hardy
5c1d40ca87
Updates whitespace to avoid line length violation.
...
The shame, oh the shame.
2016-05-02 00:23:49 -04:00
Brian Hardy
88c0c8ba8e
Improves error messaging for Configuration, particularly with YAML parsing.
2016-05-02 00:05:57 -04:00
Norio Nomura
6afc7222d9
Better handling let/var mix in ConditionalBindingCascadeRule
...
Fix #642
2016-04-29 08:54:21 +09:00
Norio Nomura
ad4ce54ccc
Add failing example to ConditionalBindingCascadeRule
2016-04-29 08:14:52 +09:00
JP Simard
fbd2bcd0ed
release 0.10.0
2016-04-27 21:07:50 +02:00
Nadohs
ba9d7fcda7
Added UIEdgeInsetsMake Legacy Rule
...
add check for `UIEdgeInsetsMake` in `LegacyConstructorRule`. `UIEdgeInsets` should be used instead.
2016-04-25 21:10:24 -07:00
Craig Siemens
7930c096a0
Changed guard to be based on the largest replacement index. Added entry to the changelog.
2016-04-24 10:38:04 -06:00
Craig Siemens
c3a5e33a59
Add autocorrect for ReturnArrowWhitespaceRule
2016-04-23 23:56:40 -06:00
Sarr Blaise
587e3886cf
import Foundation (spm_test)
2016-04-17 21:27:43 +02:00
Sarr Blaise
4f5f3a60cd
Fix correctFile: function
2016-04-17 20:59:49 +02:00
Sarr Blaise
666a5b4899
Add failing example to LegacyCGGeometryFunctionsRule
2016-04-17 20:42:06 +02:00
Blaise Sarr
94e5226a4a
Implements correctFile: method
2016-04-17 14:56:03 +02:00
Blaise Sarr
20ef756c40
Add RegexHelpers file
...
- This will be used to centralize common used regex and avoid duplicate them
2016-04-17 14:56:03 +02:00
Blaise Sarr
3e91e27843
Enable rule
2016-04-17 14:56:03 +02:00
Blaise Sarr
4a2174de13
Implements validateFile: method
2016-04-17 14:56:03 +02:00
Blaise Sarr
9a6378520a
Add LegacyCGGeometryFunctionsRul rule
2016-04-17 14:56:03 +02:00
JP Simard
429e738806
Merge pull request #624 from realm/nn-fix-623
...
`LegacyConstantRule` and `LegacyConstructorRule` failed to `autocorrect`
2016-04-17 09:43:12 +02:00
Norio Nomura
1cb68b8706
[SPM] Add import Foundation
2016-04-17 13:20:57 +09:00
Norio Nomura
cf91026c88
Fix LegacyConstructorRule
...
#623
2016-04-17 13:01:54 +09:00
Norio Nomura
becb6913fe
Add failing example to LegacyConstructorRule
2016-04-17 13:01:54 +09:00
Norio Nomura
f36557d5e7
Fix LegacyConstantRule
...
#623
2016-04-17 13:01:54 +09:00
Norio Nomura
0c683cd4f7
Add failing example to LegacyConstantRule
2016-04-17 13:01:54 +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
39282654f4
Fix conditional_binding_cascade violations
2016-04-16 08:30:00 +09:00
Norio Nomura
0d7cbc1835
Rewrite ConditionalBindingCascadeRule
...
Fix #617
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
8055cb84a8
Add false negative example to ConditionalBindingCascadeRule
...
from #617
2016-04-16 08:30:00 +09:00