Changelog History
Page 8
-
v0.13.2 Changes
π₯ Breaking
- None.
β¨ Enhancements
TrailingCommaRule
now only triggers when a declaration is multi-line when usingmandatory_comma: true
.
Marcelo Fabri #910 #911
π Bug Fixes
-
v0.13.1 Changes
π₯ Breaking
- None.
β¨ Enhancements
β Add
ImplicitGetterRule
to warn against usingget
on computed read-only properties.
Marcelo Fabri #57β Add
WeakDelegateRule
rule to enforce delegate instance variables to be marked asweak
.
Olivier Halligonβ Add
SyntacticSugar
rule that enforces that shorthanded syntax should be used when possible, for example[Int]
instead ofArray<Int>
.
Marcelo Fabri #319π Allow specifying multiple rule identifiers in comment commands. For example,
// swiftlint:disable:next force_cast force_try
. Works with all command types (disable
/enable
) and modifiers (next
,this
,previous
or blank).
JP Simard #861β Add
NimbleOperatorRule
opt-in rule that enforces using operator overloads instead of free matcher functions when using Nimble.
Marcelo Fabri #881closure_spacing
rule now accepts empty bodies with a space.
Marcelo Fabri #875β Add
TrailingCommaRule
to enforce/forbid trailing commas in arrays and dictionaries. The default is to forbid them, but this can be changed with themandatory_comma
configuration.
Marcelo Fabri #883β Add support for
fileprivate
inPrivateOutletRule
andPrivateUnitTestRule
.
Marcelo Fabri #781 #831π Make
MarkRule
correctable.
kohtenko
π Bug Fixes
Rule out a few invalid
@IBInspectable
cases invalid_ibinspectable
.
Daniel Duanπ Fix a few edge cases where malformed
MARK:
comments wouldn't trigger a violation.
JP Simard #805π Now lints single files passed to
--path
even if this file is excluded from the configuration file (.swiftlint.yml
).
JP Simardπ Fixed error severity configuration in
colon
rule.
Marcelo Fabri #863switch_case_on_newline
rule should ignore trailing comments.
Marcelo Fabri #874switch_case_on_newline
rule shouldn't trigger on enums.
Marcelo Fabri #878π Fix regex bug in Comma Rule causing some violations to not be triggered when there were consecutive violations in the same expression.
Savio Figueiredo #872
-
v0.13.0 Changes
π₯ Breaking
- None.
β¨ Enhancements
π§ Add
ignores_comment
configuration fortrailing_whitespace
rule.
Javier HernΓ‘ndez #576β Added HTML reporter, identifier is
html
.
Johnykutty Mathewβ Add
SuperCallRule
opt-in rule that warns about methods not calling to super.
Angel G. Olloqui #803β Add
RedundantNilCoalesingRule
opt-in rule that warns against?? nil
.
Daniel Beard #764β Added opt-in rule to makes closure expressions spacing consistent.
J. Cheyo Jimenez #770Adds
allow_private_set
configuration for theprivate_outlet
rule.
Rohan Dhaimadeπ Swift 2.3 support.
Norio Nomura, Syo IkedaColor literals count as single characters to avoid unintentional line length violations.
Jonas #742β Add
SwitchCaseOnNewlineRule
opt-in rule that enforces a newline aftercase pattern:
in aswitch
.
Marcelo Fabri #681β Add
ValidIBInspectableRule
rule that checks if@IBInspectable
declarations are valid. An@IBInspectable
is valid if:- It's declared as a
var
(notlet
) - Its type is explicit (not inferred)
- Its type is one of the
supported types
- It's declared as a
- β Add
ExplicitInitRule
opt-in rule to discourage callinginit
directly.
Matt Taube #715
π Bug Fixes
π Fixed whitespace being added to TODO messages.
W. Bagdon #792π Fixed regex bug in Vertical Whitespace Rule by using SourceKitten instead. The rule now enabled by default again (no longer opt-in).
J. Cheyo Jimenez #772Correctable rules no longer apply corrections if the rule is locally disabled.
J. Cheyo Jimenez
#601π Fixed regex bug in Mark Rule where MARK could not be used with only a hyphen but no descriptive text:
// MARK: -
.
Ruotger Deecke #778π Fixed: Private unit test rule not scoped to test classes.
Fixed: Private unit test rule config is ignored if regex is missing.
Cristian Filipov #786π Fixed:
ConditionalReturnsOnNewline
now respects severity configuration.
Rohan Dhaimade #783π Fixed:
ConditionalReturnsOnNewline
now checks ifreturn
is a keyword, avoiding false positives.
Marcelo Fabri #784ForceUnwrappingRule
did not recognize force unwraps in return statements using subscript.
Norio Nomura #813
-
v0.12.0 Changes
π₯ Breaking
- π Fixed: SwiftLint assumes paths in the YAML config file are relative to the
current directory even when
--path
is passed as an argument.
Cristian Filipov
β¨ Enhancements
- β Add
--enable-all-rules
CLI option tolint
command to facilitate running all rules, even opt-in and disabled ones, ignoringwhitelist_rules
.
JP Simard #1170
π Bug Fixes
- π Fixed: SwiftLint assumes paths in the YAML config file are relative to the
current directory even when
-
v0.11.2 Changes
π This release has seen a phenomenal uptake in community contributions!
π₯ Breaking
- None.
β¨ Enhancements
β Add
MarkRule
rule to enforce// MARK
syntax.
Krzysztof Rodak #749β Add
PrivateOutletRule
opt-in rule to enforce@IBOutlet
instance variables to beprivate
.
Olivier Halligonβ Add content of the todo statement to message.
J. Cheyo Jimenez #478β Add
LegacyNSGeometryFunctionsRule
rule. AddNSSize
,NSPoint
, andNSRect
constants and constructors to existing rules.
David RΓΆnnqvistβ Added Vertical Whitespace Rule.
J. Cheyo Jimenez #548β Removed ConditionalBindingCascadeRule.
J. Cheyo Jimenez #701Allow setting
flexible_right_spacing
configuration for thecolon
rule.
Shai Mishali #730β Add Junit reporter.
Matthew EllisLeadingWhitespaceRule is now auto correctable.
masters3dβ Add included regex for custom rules to control what files are processed.
bootstraponline #689β Add rule to check for private unit tests (private unit tests don't get run by XCTest).
Cristian Filipovβ Add configuration for setting a warning threshold.
woodhamgh 696β Adds 'ConditionalReturnsOnNewLineRule' rule.
Rohan Dhaimade
π Bug Fixes
π Fixed CustomRule Regex.
J. Cheyo Jimenez #717 #726π Allow disabling custom rules in code.
J. Cheyo Jimenez #515π Fix LegacyConstructorRule when using variables instead of numbers.
Sarr Blaise #646π Fix force_unwrapping false positive inside strings.
Daniel Beard #721
-
v0.11.1 Changes
π₯ Breaking
- None.
β¨ Enhancements
- π§ Added
statement_mode
configuration to thestatement_position
rule. The
default
mode keeps the current SwiftLint behavior of keepingelse
andcatch
statements on the same line as the closing brace before them. Theuncuddled_else
configuration requires theelse
andcatch
to be on a new line with the same leading whitespace as the brace.
Mike Skiba #651
π Bug Fixes
- β Remove extraneous argument label added in LegacyCGGeometryFunctionsRule
autocorrect.
Sarr Blaise 643
-
v0.11.0 Changes
π₯ Breaking
Now
type_name
allows lowercase enum values to match the Swift API Design Guidelines.
Jorge Bernal #654π Embedding frameworks needed by
swiftlint
was moved from SwiftLintFramework Xcode target to the swiftlint target. TheSwiftLintFramework.framework
product built by the SwiftLintFramework target no longer contains unnecessary frameworks or multiple copies of the Swift libraries.
Norio Nomura
β¨ Enhancements
β Add
--format
option toautocorrect
command which re-indents Swift files much like pasting into Xcode would. This option isn't currently configurable, but that can change if users request it.
JP Simardπ Improve error messages for invalid configuration files.
Brian HardyAdded the user-configurable option
ignores_empty_lines
to thetrailing_whitespace
rule. It can be used to control whether theTrailingWhitespaceRule
should report and correct whitespace-indented empty lines. Defaults tofalse
. Added unit tests.
Reimar Twelker
π Bug Fixes
π Fix false positive in conditional binding cascade violation.
Norio Nomura #642Another conditional binding fix, this time for enum that has two parameters or an if statement with two case tests.
Andrew Rahn #667π Fix regression in CommaRule ignoring violations when the comma is followed by a comment.
Norio Nomura #683
-
v0.10.0 Changes
π₯ Breaking
- None.
β¨ Enhancements
Now
libclang.dylib
andsourcekitd.framework
are dynamically loaded at runtime by SourceKittenFramework to use the versions included in the Xcode version specified byxcode-select -p
or custom toolchains.
Norio Nomura #167β Add
LegacyCGGeometryFunctionsRule
rule.
Sarr Blaise #625π SwiftLint no longer crashes when SourceKitService crashes.
Norio NomuraRewrite
conditional_binding_cascade
rule.
Norio Nomura #617β Add autocorrect for
ReturnArrowWhitespaceRule
.
Craig Siemens
π Bug Fixes
π Failed to launch swiftlint when Xcode.app was placed at non standard path.
Norio Nomura #593ClosingBraceRule
no longer triggers across line breaks.
Josh Friend #592LegacyConstantRule
andLegacyConstructorRule
failed toautocorrect
.
Norio Nomura #623
-
v0.9.2 Changes
π₯ Breaking
- None.
β¨ Enhancements
Return different exit codes to distinguish between types of errors:
VariableNameRule
now accepts symbols starting with more than one uppercase letter to allow for names like XMLString or MIMEType.
Erik Aigner #566
π Bug Fixes
Avoid overwriting files whose contents have not changed.
Neil Gall #574π Fix
CommaRule
mismatch between violations and corrections.
Norio Nomura #466π Fix more false positives in
ForceUnwrappingRule
.
Norio Nomura #546 #547
-
v0.9.1 Changes
π₯ Breaking
- None.
β¨ Enhancements
- None.
π Bug Fixes
π Fix force unwrap rule missed cases with quotes.
Norio Nomura #535π Fix issues with nested
.swiftlint.yml
file resolution.
Norio Nomura #543