Marcelo Fabri
4e3a0b01a1
Using byte range
2016-11-30 11:51:25 -02:00
Marcelo Fabri
d94b5d8bd2
Adding attributes rule
...
Fixes https://github.com/realm/SwiftLint/issues/846
2016-11-30 11:51:25 -02:00
Marcelo Fabri
af15654ddc
Moving functionKinds and typeKinds to extension
2016-11-30 11:51:25 -02:00
JP Simard
7d94f2b461
small refactoring of SwitchCaseOnNewlineRule.swift
2016-11-28 22:59:04 -08:00
JP Simard
ed70259198
remove unnecessary file.invalidateCache()
...
this is already called in Linter.correct() if corrections were applied
2016-11-28 22:43:02 -08:00
JP Simard
0b39dec1b0
fix up indentation in MarkRule.swift
2016-11-28 22:30:31 -08:00
JP Simard
99005133de
Merge pull request #893 from kohtenko/master
...
Add autocorrection to MarkRule
2016-11-28 22:28:25 -08:00
JP Simard
4bb23dd75a
omit self if it can be inferred
2016-11-28 22:18:56 -08:00
JP Simard
83830861d6
Merge pull request #905 from marcelofabri/swift3-acls
...
Add support for Swift 3 ACLs (open & fileprivate) in existing rules
2016-11-28 22:02:55 -08:00
JP Simard
d9287ba38f
refactor isPrivateLevel(identifier:)
2016-11-28 21:51:42 -08:00
JP Simard
3863e542c1
fix some issues with ExplicitInitRule.swift
...
- didn't compile with Xcode 7.3.1
- had some function signature formatting inconsistent with codebase
2016-11-28 21:41:09 -08:00
Daniel Duan
7d4e0aed94
Fix ValidIBInspectable rule implementation
...
1. `NSNumber` is not IB-inspectable at all.
2. Explicitly typed `Optional`s and `ImplicitlyUnwrappedOptional`s aren't
supported by `@IBInspectable`, reference type or not.
2016-11-28 17:36:39 -08:00
Oleg Kokhtenko
57d8ece116
Corrections for mark rule
2016-11-28 09:40:05 +01:00
Oleg Kokhtenko
92c586e79b
Update regex part to be more precise.
2016-11-28 09:38:36 +01:00
Oleg Kokhtenko
96a9fe398c
Add autocorrection to MarkRule
2016-11-28 09:38:36 +01:00
Marcelo Fabri
fd71465cd2
Add support for filePrivate and open in rules
...
Fixes #781 and #831
2016-11-27 16:26:41 -02:00
Marcelo Fabri
6a8ebe61c6
Use severityConfiguration in rules == function
2016-11-26 23:50:52 -02:00
Marcelo Fabri
d8fd865491
Updates existing code to respect TrailingCommaRule
2016-11-25 23:52:07 -02:00
Marcelo Fabri
3bacc80fc7
Add configuration to enforce/forbid trailing comma
2016-11-25 23:51:25 -02:00
Marcelo Fabri
8464a71095
Addded TrailingCommaRule
2016-11-25 20:56:46 -02:00
JP Simard
ad019afd71
Merge pull request #879 from marcelofabri/closure_spacing_empty_body
...
closure_spacing accepts empty bodies with a space
2016-11-25 14:18:54 -08:00
JP Simard
0dc882b080
Merge pull request #876 from sadefigu/CommaRuleImpromentConsecutiveViolations
...
Comma rule does not get triggered in all situations
2016-11-25 14:12:39 -08:00
JP Simard
e65437cd7a
Merge pull request #877 from marcelofabri/switch_case_on_newline-comment
...
`switch_case_on_newline` bugfixes
2016-11-25 14:11:06 -08:00
Marcelo Fabri
4ed50c2411
closure_spacing accepts empty bodies with a space
2016-11-25 19:42:31 -02:00
Marcelo Fabri
b2f16eead5
Fixing #878
2016-11-25 19:41:17 -02:00
Marcelo Fabri
6b50062cd0
switch_case_on_newline should ignore trailing comments
...
Fixes #874
2016-11-25 19:41:17 -02:00
Marcelo Fabri
0c5ff7f7b5
Add NimbleOperatorRule
...
Fixes #881
2016-11-25 13:31:06 -08:00
JP Simard
e93eee31e7
generally clean up usage of swiftlint comment commands
...
used within the codebase itself.
2016-11-25 13:10:38 -08:00
JP Simard
aeb5d7ae44
Merge pull request #896 from realm/jp-syntatic-sugar-rule
...
Add SyntacticSugarRule
2016-11-25 12:51:40 -08:00
JP Simard
6ffab45c2b
Merge pull request #880 from marcelofabri/colon-rule-error-severity
...
Fix severity configuration in ColonRule
2016-11-25 12:38:41 -08:00
Marcelo Fabri
30c978c8f5
Updating regex after PR feedback
2016-11-25 12:25:10 -08:00
Marcelo Fabri
c4b960000d
Adding SyntacticSugar rule
2016-11-25 12:25:10 -08:00
JP Simard
a4bc57ad98
minor WeakDelegateRule formatting
2016-11-25 12:06:43 -08:00
Olivier Halligon
56878180df
[weak_delegate] Better code style for testing string matching
2016-11-25 12:04:43 -08:00
Olivier Halligon
b3322c34f1
Thinking back about it, WeakDelegate rule should in fact maybe not be Opt-In, but rather enabled by default
...
(people can still disable it if needs be, but I find it very rare and not that debatable that all delegates should always be weak)
2016-11-25 12:04:43 -08:00
Olivier Halligon
dd75f3135a
Additional code comments
...
(Re-triggering the Travis build to check if SourceKit errors are deterministic)
2016-11-25 12:04:18 -08:00
Olivier Halligon
71b475d9d7
[New Rule] weak_delegate
2016-11-25 12:04:18 -08:00
JP Simard
67d4b9b1c5
ValidIBInspectableRule formatting
2016-11-25 11:52:27 -08:00
JP Simard
5dbffd3b26
fix typo in OverriddenSuperCallRule file name
2016-11-25 11:47:35 -08:00
JP Simard
4072ca2981
OverriddenSuperCallRule formatting
2016-11-25 11:46:07 -08:00
JP Simard
10a865c2ea
comment indentation
2016-11-25 11:43:26 -08:00
JP Simard
df49398381
ClosureSpacingRule formatting
2016-11-25 11:40:16 -08:00
JP Simard
1f98e72e17
small formatting fixes to ImplicitGetterRule
2016-11-25 10:59:29 -08:00
JP Simard
1151c18831
Merge pull request #862 from marcelofabri/implicit-getters
...
Add ImplicitGetterRule
2016-11-25 10:56:27 -08:00
Marcelo Fabri
3963499103
Fix severity configuration in ColonRule
...
Fixes #863
2016-11-24 11:17:41 -02:00
JP Simard
a2a636d749
fix MarkRule edge cases
...
fixes #805
2016-11-23 15:30:29 -08:00
Marcelo Fabri
21a8394409
Rewriting rule to deal with nested structures
2016-11-13 22:22:49 -02:00
Marcelo Fabri
4e1d0d02f3
Add ImplicitGetterRule
2016-11-13 22:22:49 -02:00
Savio Mendes de Figueiredo
ce502db5c6
Improving comma rule to support expressions that begin with the comma (fixes a gap when there are consecutive comma violations)
...
Fixing swiflint warnings
Improving comma rule to support expressions that begin with the comma (fixes a gap when there are consecutive comma violations)
For example, if the expression is 'let a = [1,2,3]', the previous comma rule regexp would consume '1,2' and the remaining ',3' would not be consumed by the regexp because it does not support something that begins with a comma.
Updating changelog.md
Improving comma rule to support expressions that begin with the comma (fixes a gap when there are consecutive comma violations)
2016-11-11 20:41:37 -08:00
JP Simard
55a0b5ec5a
fix typo: coalesing -> coalescing
...
fixes #866
2016-11-07 13:30:53 -08:00