variable_namerule (VariableNameRule) is nowidentifier_name(IdentifierNameRule) as it validates other identifiers as well.
Marcelo Fabri #663
-
Performance improvements to
generic_type_name,redundant_nil_coalescing,mark,first_whereandvertical_whitespacerules.
Marcelo Fabri -
Add
discarded_notification_center_observerrule that warns when the result ofNotificationCenter.addObserver(forName:object:queue:using:)is not stored so it can be removed later.
Marcelo Fabri #1062 -
Add
notification_center_detachmentrule that warns against an object removing itself fromNotificationCenterin an unsafe location.
Marcelo Fabri #1061 -
Accept
AnyObjectandNSObjectProtocolinclass_delegate_protocol.
Jon Shier #1261 -
Add
ignores_function_declarationsandignores_commentsas options toLineLengthRule.
Michael L. Welles #598 #975 -
Add
for_whererule that validates thatwhereis used in aforloop instead of a singleifexpression inside the loop.
Marcelo Fabri #1228 -
unused_enumeratedrule now warns when only the index is being used. You should use.indicesinstead of.enumerated()in this case.
Marcelo Fabri #1278 -
Add
ignores_case_statementsas option toCyclomaticComplexityRule.
Michael L. Welles #1298 -
Add correctable
redundant_discardable_letrule that warns whenlet _ = foo()is used to discard a result from a function instead of_ = foo().
Marcelo Fabri #1232 -
Accept global and local variables in
implicit_getterrule.
Marcelo Fabri -
Add
--enabled(or-e) switch to therulesCLI command, to only display enabled rules.
Natan Rolnik #1270 -
Now
nestingrule can be configured with a type and statement level.
Hayashi Tatsuya #1318
-
Fix crashes when accessing cached regular expressions when linting in parallel.
JP Simard #1344 -
Fix a false positive on
large_tuplerule when using closures.
Marcelo Fabri #1234 -
Fix
force_unwrapfalse positive for bool negation.
Aaron McTavish #918 -
Fix false positive and wrong correction on
number_separatorrule.
Marcelo Fabri #1242 -
Retain closure parameter types when they are specified during autocorrect.
Allen Zeng #1175 -
Fix
redundant_void_returnmatches if return type starts with Void~.
Hayashi Tatsuya -
Ignore
unused_closure_parameterrule on closures that are called inline.
Marcelo Fabri #1161 -
Disable
valid_docsandmissing_docsrules when running in Swift 2.3 or later as they have not been updated to work with those versions of Swift. Both rules are now opt-in because of this.
JP Simard #728 -
Fix false positive on
large_tuplerule when using generics inside a tuple.
Marcelo Fabri #1257 -
Make
ASTRuledefault implementation to navigate through the substructure even if its children are from a different kind. This fixes some violations not being reported in some contexts.
Marcelo Fabri #1237 -
Reimplement
switch_case_on_newlinerule to be anASTRuleand be more reliable, fixing some false negatives and false positives.
Marcelo Fabri #1268 -
Fix
closure_end_indentationrule false positive when using single-line closures.
Marcelo Fabri #1216 -
Fix
todorule messages when the comment is not on a new line.
Marcelo Fabri #1304 -
Fix false negative on
unused_closure_parameterrule.
Hayashi Tatsuya
- None.
-
Improve
unused_optional_bindingrule on tuples check.
Rafael Machado -
Update
variable_nameto ignore overrides.
Aaron McTavish #1169 -
Update
number_separatorrule to allow for specifying minimum length of fraction.
Bjarke Søndergaard #1200 -
Update
legacy_constantrule to supportCGFloat.piandFloat.pi.
Aaron McTavish #1198
-
Fix false positives on
shorthand_operatorrule.
Marcelo Fabri #1156 #1163 -
Fix false positive on
redundant_optional_initializationrule.
Marcelo Fabri #1159 -
Fix false positive on
operator_usage_whitespacerule with decimal literals in exponent format.
Marcelo Fabri #1153 -
Fix
excludedconfiguration not excluding files.
Marcelo Fabri #1166 -
Disable commutative operations on
shorthand_operatorrule.
Marcelo Fabri #1182 #1183 #1211 -
Fix crash when running in a Sandboxed environment, which also fixes Homebrew distribution. Set the
SWIFTLINT_SWIFT_VERSIONenvironment variable to either2or3to force that operation mode, bypassing the Swift version determined from SourceKit.
JP Simard
- Several API breaking changes were made to conform to the Swift 3 API Design Guidelines. We apologize for any inconvenience this may have caused.
-
Speed up linting by caching linter results across invocations.
Marcelo Fabri #868 -
Speed up linting by processing multiple files and rules concurrently.
JP Simard #1077 -
Make many operations in SwiftLintFramework safe to call in multithreaded scenarios, including accessing
Linter.styleViolations.
JP Simard #1077 -
Permit unsigned and explicitly-sized integer types in
valid_ibinspectable
Daniel Duan -
Make
nimble_operatorrule correctable.
Vojta Stavik -
Add
vertical_parameter_alignmentrule that checks if parameters are vertically aligned for multi-line function declarations.
Marcelo Fabri #1033 -
Add more helpful reason strings to TrailingCommaRule.
Matt Rubin -
Add
class_delegate_protocolrule that warns against protocol declarations that aren't marked as: classor@objc.
Marcelo Fabri #1039 -
Add correctable
redundant_optional_initializationrule that warns against initializing optional variables withnil.
Marcelo Fabri #1052 -
redundant_nil_coalescingrule is now correctable.
Marcelo Fabri -
Make
number_separatorrule correctable.
Marcelo Fabri -
empty_parentheses_with_trailing_closurerule is now correctable.
Marcelo Fabri -
Add correctable
redundant_void_returnrule that warns against explicitly adding-> Voidto functions.
Marcelo Fabri #1066 -
Add an opt-in rule that enforces alphabetical sorting of imports.
Scott Berrevoets #900 -
type_namerule forces enum values to be UpperCamelCase again when used with Swift 2.3.
Marcelo Fabri #1090 -
Make
weak_delegaterule ignore computed properties.
Rafael Machado #1089 -
Add
object_literalopt-in rule that warns against using image and color inits that can be replaced for#imageLiteralor#colorLiteralin Swift 3.
Marcelo Fabri #1060 -
Now
number_separatorrule can be configured with a minimum length.
Marcelo Fabri #1109 -
Add
compiler_protocol_initrule that flags usage of initializers declared in protocols used by the compiler such asExpressibleByArrayLiteralthat shouldn't be called directly. Instead, you should use a literal anywhere a concrete type conforming to the protocol is expected by the context.
Marcelo Fabri #1096 -
Add
large_tupleconfigurable rule that validates that tuples shouldn't have too many members.
Marcelo Fabri #1065 -
Add
generic_type_namerule that validates generic constraint type names.
Marcelo Fabri #51 -
Update
vertical_whitespacerule to allow configuration of the number of consecutive empty lines before a violation usingmax_empty_lines. The default value is still 1 line.
Aaron McTavish #769 -
Add check to ignore urls in
line_lengthrule whenignores_urlsconfiguration is enabled.
Javier Hernández #384 -
Add
shorthand_operatorrule that validates that shorthand operators should be used when possible.
Marcelo Fabri #902 -
Allow specifying a
swiftlint_versionconfiguration key which will log a warning if the current running version of SwiftLint is different than this value.
JP Simard #221 -
Add internal support for deprecated rule aliases.
Marcelo Fabri #973 -
Add
unused_optional_bindingrule that will check for optional bindings not being used.
Rafael Machado #1116
-
Ignore close parentheses on
vertical_parameter_alignmentrule.
Marcelo Fabri #1042 -
syntactic_sugarrule now doesn't flag declarations that can't be fixed.
Marcelo Fabri #928 -
Fix false positives on
closure_parameter_positionandunused_closure_parameterrules with Swift 2.3.
Marcelo Fabri #1019 -
Fix crash on
trailing_commarule with Swift 2.3.
Marcelo Fabri #921 -
Fix out of range exception in
AttributesRule.
JP Simard #1105 -
Fix
variable_nameandtype_namerules on Linux.
Marcelo Fabri -
Fix linting directories with names ending with
.swift.
JP Simard -
Fix running
swiftlint versionwhen building with Swift Package Manager.
Marcelo Fabri #1045 -
Fix false positive on
vertical_parameter_alignmentrule when breaking line in a default parameter declaration.
Marcelo Fabri #1129
line_lengthrule now has a default value of120for warnings.
Marcelo Fabri #1008
-
Add
closure_end_indentationopt-in rule that validates closure closing braces according to these rules:- If the method call has chained breaking lines on each method
(
.is on a new line), the closing brace should be vertically aligned with the.. - Otherwise, the closing brace should be vertically aligned with the beginning of the statement in the first line.
- If the method call has chained breaking lines on each method
(
-
operator_usage_whitespacerule is now correctable.
Marcelo Fabri -
implicit_getterandmarkrule performance improvements.
Marcelo Fabri -
HTML reports now display a relative path to files.
Jamie Edge -
colonrule now validates colon position in dictionaries too. You can disable this new validation with theapply_to_dictionariesconfiguration.
Marcelo Fabri #603 -
Add
first_whereopt-in rule that warns against using.filter { /* ... */ }.firstin collections, as.first(where: { /* ... */ })is often more efficient.
Marcelo Fabri #1005
-
FunctionParameterCountRulealso ignores generic initializers.
Mauricio Hanika -
Grammar checks.
Michael Helmbrecht -
Fix the validity and styling of the HTML reporter.
Jamie Edge -
Fix false positive in
empty_parentheses_with_trailing_closurerule.
Marcelo Fabri #1021 -
Fix false positive in
switch_case_on_newlinewhen switching over a selector.
Marcelo Fabri #1020 -
Fix crash in
closure_parameter_positionrule.
Marcelo Fabri #1026 -
Fix false positive in
operator_usage_whitespacerule when using image literals.
Marcelo Fabri #1028
- SwiftLint now requires Xcode 8.x and Swift 3.x to build.
APIs have not yet been adapted to conform to the Swift 3 API Design
Guidelines but will shortly.
JP Simard Norio Nomura
-
Now builds and passes most tests on Linux using the Swift Package Manager with Swift 3. This requires
libsourcekitdInProc.soto be built and located in/usr/lib, or in another location specified by theLINUX_SOURCEKIT_LIB_PATHenvironment variable. A preconfigured Docker image is available on Docker Hub by the ID ofnorionomura/sourcekit:302.
JP Simard Norio Nomura #732 -
Add
dynamic_inlinerule to discourage combination of@inline(__always)anddynamicfunction attributes.
Daniel Duan -
Add
number_separatoropt-in rule that enforces that underscores are used as thousand separators in large numbers.
Marcelo Fabri #924 -
Add
file_headeropt-in rule that warns when a file contains a copyright comment header, such as the one Xcode adds by default.
Marcelo Fabri #844 -
FunctionParameterCountRulenow ignores initializers.
Denis Lebedev #544 -
Add
EmojiReporter: a human friendly reporter.
Michał Kałużny -
Add
redundant_string_enum_valuerule that warns against String enums with redundant value assignments.
Marcelo Fabri #946 -
Add
attributesopt-in rule which validates if an attribute (@objc,@IBOutlet,@discardableResult, etc) is in the right position:- If the attribute is
@IBActionor@NSManaged, it should always be on the same line as the declaration - If the attribute has parameters, it should always be on the line above the declaration
- Otherwise:
- if the attribute is applied to a variable, it should be on the same line
- if it's applied to a type or function, it should be on the line above
- if it's applied to an import (the only option is
@testable import), it should be on the same line. You can also configure what attributes should be always on a new line or on the same line as the declaration with thealways_on_same_lineandalways_on_line_abovekeys.
- If the attribute is
-
Add
empty_parentheses_with_trailing_closurerule that checks for empty parentheses after method call when using trailing closures.
Marcelo Fabri #885 -
Add
closure_parameter_positionrule that validates that closure parameters are in the same line as the opening brace.
Marcelo Fabri #931 -
type_namerule now validatestypealiasandassociatedtypetoo.
Marcelo Fabri #49 #956 -
Add
ProhibitedSuperRuleopt-in rule that warns about methods calling to super that should not, for exampleUIViewController.loadView().
Aaron McTavish #970 -
Add correctable
void_returnrule to validate usage of-> Voidover-> ().
Marcelo Fabri JP Simard #964 -
Add correctable
empty_parametersrule to validate usage of() ->overVoid ->.
Marcelo Fabri #573 -
Add
operator_usage_whitespaceopt-in rule to validate that operators are surrounded by a single whitespace when they are being used.
Marcelo Fabri #626 -
Add
unused_closure_parametercorrectable rule that validates if all closure parameters are being used. If a parameter is unused, it should be replaced by_.
Marcelo Fabri JP Simard #982 -
Add
unused_enumeratedrule that warns against unused indexes when using.enumerated()on a for loop, e.g.for (_, foo) in bar.enumerated().
Marcelo Fabri #619
-
Fix
weak_delegaterule reporting a violation for variables containing but not ending indelegate.
Phil Webster -
Fix
weak_delegaterule reporting a violation for variables in protocol declarations.
Marcelo Fabri #934 -
Fix
trailing_commarule reporting a violation for commas in comments.
Marcelo Fabri #940 -
Fix XML reporters not escaping characters.
Fabian Ehrentraud #968 -
Fix specifying multiple rule identifiers in comment commands.
JP Simard #976 -
Fix invalid CSS in HTML reporter template.
Aaron McTavish #981 -
Fix crash when correcting
statement_positionrule when there are multi-byte characters in the file.
Marcelo Fabri
- None.
TrailingCommaRulenow only triggers when a declaration is multi-line when usingmandatory_comma: true.
Marcelo Fabri #910 #911
- None.
-
Add
ImplicitGetterRuleto warn against usinggeton computed read-only properties.
Marcelo Fabri #57 -
Add
WeakDelegateRulerule to enforce delegate instance variables to be marked asweak.
Olivier Halligon -
Add
SyntacticSugarrule 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,previousor blank).
JP Simard #861 -
Add
NimbleOperatorRuleopt-in rule that enforces using operator overloads instead of free matcher functions when using Nimble.
Marcelo Fabri #881 -
closure_spacingrule now accepts empty bodies with a space.
Marcelo Fabri #875 -
Add
TrailingCommaRuleto enforce/forbid trailing commas in arrays and dictionaries. The default is to forbid them, but this can be changed with themandatory_commaconfiguration.
Marcelo Fabri #883 -
Add support for
fileprivateinPrivateOutletRuleandPrivateUnitTestRule.
Marcelo Fabri #781 #831 -
Make
MarkRulecorrectable.
kohtenko
-
Rule out a few invalid
@IBInspectablecases 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
--patheven if this file is excluded from the configuration file (.swiftlint.yml).
JP Simard -
Fixed error severity configuration in
colonrule.
Marcelo Fabri #863 -
switch_case_on_newlinerule should ignore trailing comments.
Marcelo Fabri #874 -
switch_case_on_newlinerule 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
- None.
-
Add
ignores_commentconfiguration fortrailing_whitespacerule.
Javier Hernández #576 -
Added HTML reporter, identifier is
html.
Johnykutty Mathew -
Add
SuperCallRuleopt-in rule that warns about methods not calling to super.
Angel G. Olloqui #803 -
Add
RedundantNilCoalesingRuleopt-in rule that warns against?? nil.
Daniel Beard #764 -
Added opt-in rule to makes closure expressions spacing consistent.
J. Cheyo Jimenez #770 -
Adds
allow_private_setconfiguration for theprivate_outletrule.
Rohan Dhaimade -
Swift 2.3 support.
Norio Nomura, Syo Ikeda -
Color literals count as single characters to avoid unintentional line length violations.
Jonas #742 -
Add
SwitchCaseOnNewlineRuleopt-in rule that enforces a newline aftercase pattern:in aswitch.
Marcelo Fabri #681 -
Add
ValidIBInspectableRulerule that checks if@IBInspectabledeclarations are valid. An@IBInspectableis 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
ExplicitInitRuleopt-in rule to discourage callinginitdirectly.
Matt Taube #715
-
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 #772 -
Correctable 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:
ConditionalReturnsOnNewlinenow respects severity configuration.
Rohan Dhaimade #783 -
Fixed:
ConditionalReturnsOnNewlinenow checks ifreturnis a keyword, avoiding false positives.
Marcelo Fabri #784 -
ForceUnwrappingRuledid not recognize force unwraps in return statements using subscript.
Norio Nomura #813
- Fixed: SwiftLint assumes paths in the YAML config file are relative to the
current directory even when
--pathis passed as an argument.
Cristian Filipov
- Add
--enable-all-rulesCLI option tolintcommand to facilitate running all rules, even opt-in and disabled ones, ignoringwhitelist_rules. JP Simard #1170
This release has seen a phenomenal uptake in community contributions!
- None.
-
Add
MarkRulerule to enforce// MARKsyntax.
Krzysztof Rodak #749 -
Add
PrivateOutletRuleopt-in rule to enforce@IBOutletinstance variables to beprivate.
Olivier Halligon -
Add content of the todo statement to message.
J. Cheyo Jimenez #478 -
Add
LegacyNSGeometryFunctionsRulerule. AddNSSize,NSPoint, andNSRectconstants and constructors to existing rules.
David Rönnqvist -
Added Vertical Whitespace Rule.
J. Cheyo Jimenez #548 -
Removed ConditionalBindingCascadeRule.
J. Cheyo Jimenez #701 -
Allow setting
flexible_right_spacingconfiguration for thecolonrule.
Shai Mishali #730 -
Add Junit reporter.
Matthew Ellis -
LeadingWhitespaceRule 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
-
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
- None.
- Added
statement_modeconfiguration to thestatement_positionrule. The
defaultmode keeps the current SwiftLint behavior of keepingelseandcatchstatements on the same line as the closing brace before them. Theuncuddled_elseconfiguration requires theelseandcatchto be on a new line with the same leading whitespace as the brace.
Mike Skiba #651
- Remove extraneous argument label added in LegacyCGGeometryFunctionsRule
autocorrect.
Sarr Blaise 643
-
Now
type_nameallows lowercase enum values to match the Swift API Design Guidelines.
Jorge Bernal #654 -
Embedding frameworks needed by
swiftlintwas moved from SwiftLintFramework Xcode target to the swiftlint target. TheSwiftLintFramework.frameworkproduct built by the SwiftLintFramework target no longer contains unnecessary frameworks or multiple copies of the Swift libraries.
Norio Nomura
-
Add
--formatoption toautocorrectcommand 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 Hardy -
Added the user-configurable option
ignores_empty_linesto thetrailing_whitespacerule. It can be used to control whether theTrailingWhitespaceRuleshould report and correct whitespace-indented empty lines. Defaults tofalse. Added unit tests.
Reimar Twelker
-
Fix false positive in conditional binding cascade violation.
Norio Nomura #642 -
Another 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
- None.
-
Now
libclang.dylibandsourcekitd.frameworkare dynamically loaded at runtime by SourceKittenFramework to use the versions included in the Xcode version specified byxcode-select -por custom toolchains.
Norio Nomura #167 -
Add
LegacyCGGeometryFunctionsRulerule.
Sarr Blaise #625 -
SwiftLint no longer crashes when SourceKitService crashes.
Norio Nomura -
Rewrite
conditional_binding_cascaderule.
Norio Nomura #617 -
Add autocorrect for
ReturnArrowWhitespaceRule.
Craig Siemens
-
Failed to launch swiftlint when Xcode.app was placed at non standard path.
Norio Nomura #593 -
ClosingBraceRuleno longer triggers across line breaks.
Josh Friend #592 -
LegacyConstantRuleandLegacyConstructorRulefailed toautocorrect.
Norio Nomura #623
- None.
-
Return different exit codes to distinguish between types of errors:
-
VariableNameRulenow accepts symbols starting with more than one uppercase letter to allow for names like XMLString or MIMEType.
Erik Aigner #566
-
Avoid overwriting files whose contents have not changed.
Neil Gall #574 -
Fix
CommaRulemismatch between violations and corrections.
Norio Nomura #466 -
Fix more false positives in
ForceUnwrappingRule.
Norio Nomura #546 #547
- None.
- None.
-
Fix force unwrap rule missed cases with quotes.
Norio Nomura #535 -
Fix issues with nested
.swiftlint.ymlfile resolution.
Norio Nomura #543
-
Linter.reporterhas been removed andConfiguration.reporterFromString(_:)has been renamed to a free function:reporterFromString(_:).
JP Simard -
_ConfigProviderRule&ConfigurableRulehave been removed and their requirements have been moved toRule.
JP Simard -
Configuration(path:optional:silent)has been changed toConfiguration(path:rootPath:optional:quiet:).
JP Simard -
The static function
Configuration.rulesFromDict(_:ruleList:)has been moved to an instance method:RuleList.configuredRulesWithDictionary(_:).
JP Simard -
The
rulesparameter in theConfigurationinitializer has been renamed toconfiguredRules.
JP Simard -
Removed a large number of declarations from the public SwiftLintFramework API. This is being done to minimize the API surface area in preparation of a 1.0 release. See #507 for a complete record of this change.
JP Simard #479 -
All instances of the abbreviation "config" in the API have been expanded to "configuration". The
--configcommand line parameter anduse_nested_configsconfiguration key are unaffected.
JP Simard -
The
use_nested_configsconfiguration key has been deprecated and its value is now ignored. Nested configuration files are now always considered.
JP Simard
-
swiftlint lintnow accepts an optional--reporterparameter which overrides existingreportervalues in the configuration file. Choose betweenxcode(default),json,csvorcheckstyle.
JP Simard #440 -
swiftlint rulesnow shows a configuration description for all rules.
JP Simard -
lintandautocorrectcommands now accept a--quietflag that prevents status messages like 'Linting ' & 'Done linting' from being logged.
JP Simard #386 -
All top-level keys in a configuration file that accept an array now also accept a single value.
e.g.included: Sourceis equivalent toincluded:\n - Source.
JP Simard #120 -
Improve performance of
FunctionParameterCountRule.
Norio Nomura -
Improve performance of
ColonRule.
Norio Nomura
-
Fix case sensitivity of keywords for
valid_docs.
Ankit Aggarwal #298 -
Fixed inconsistencies between violations & corrections in
StatementPositionRule.
JP Simard #466 -
A warning will now be logged when invalid top-level keys are included in the configuration file.
JP Simard #120 -
Fixed
LegacyConstructorRulefrom correcting legacy constructors in string literals.
JP Simard #466 -
Fixed an issue where
variable_nameortype_namewould always report a violation when configured with only awarningvalue on eithermin_lengthormax_length.
JP Simard #522
-
Setting only warning on
SeverityLevelsConfigrules now disables the error value.
Robin Kunde #409 -
enabled_ruleshas been renamed toopt_in_rules.
Daniel Beard
-
Add
whitelist_rulesrule whitelists in config files.
Daniel Beard #256 -
Improve performance of
ColonRule,LineLengthRule&syntaxKindsByLine.
Norio Nomura -
Add command to display rule description:
swiftlint rules <rule identifier>.
Tony Li #392 -
Add
FunctionParameterCountRule.
Denis Lebedev #415 -
Measure complexity of nested functions separately in
CyclomaticComplexityRule.
Denis Lebedev #424 -
Added exception for multi-line
if/guard/whileconditions to allow opening brace to be on a new line inOpeningBraceRule.
Scott Hoyt #355 -
The
rulescommand now prints a table containing values for:identifier,opt-in,correctable,enabled in your config&configuration.
JP Simard #392 -
Reduce maximum memory usage.
Norio Nomura
-
Fix more false positives in
ValidDocsRule.
diogoguimaraes #451 -
Fix
trailing_newlineautocorrect to handle more than one violation per line.
Daniel Beard #465 -
Fix complexity measurement for switch statements in
CyclomaticComplexityRule.
Denis Lebedev #461
- None.
- None.
- Fix several false positives in
ValidDocsRule.
diogoguimaraes #375
- None.
-
Improve performance of
MissingDocsRule.
Norio Nomura -
Added
CustomRules.
Scott Hoyt
#123 -
Added opt-in
ForceUnwrappingRuleto issue warnings for all forced unwrappings.
Benjamin Otto #55
- Fix several false positives in
ValidDocsRule.
diogoguimaraes #375
-
Replaced all uses of
XPCDictionarywith[String: SourceKitRepresentable].
JP Simard -
VariableNameMinLengthRuleandVariableNameMaxLengthRulehave been removed.VariableNameRulenow has this functionality.
Scott Hoyt -
ViolationLevelRulehas been removed. This functionality is now provided byConfigProviderRuleandSeverityLevelsConfig.
Scott Hoyt
-
TypeBodyLengthRulenow does not count comment or whitespace lines.
Marcelo Fabri #369 -
FunctionBodyLengthRulenow does not count comment or whitespace lines.
Marcelo Fabri #258 -
All
Rules are now configurable in at least their severity:SeverityConfig.
Scott Hoyt #371 #130 #268 -
TypeNameRuleandVariableNameRuleconform toConfigProviderRuleusingNameConfigto supportmin_length,max_length, andexcludednames.
Scott Hoyt #388 #259 #191 -
Add
CyclomaticComplexityRule.
Denis Lebedev
-
Fix crash caused by infinite recursion when using nested config files.
JP Simard #368 -
Fix crash when file contains NULL character.
Norio Nomura #379
-
ParameterizedRuleis removed. UseConfigurableRuleinstead.
Scott Hoyt #353 -
To activate a
Rule, it must be added to the globalmasterRuleList.
Scott Hoyt
-
ConfigurableRuleprotocol allows for improved rule configuration. SeeCONTRIBUTINGfor more details.
Scott Hoyt #303 -
VariableNameMinLengthRulenow supports excluding certain variable names (e.g. "id").
Scott Hoyt #231 -
ViolationLevelRuleprovides defaultConfigurableRuleimplementation for rules that only need integer error and warning levels.
Scott Hoyt -
Add AutoCorrect for StatementPositionRule.
Raphael Randschau -
Add AutoCorrect for CommaRule.
Raphael Randschau -
Add AutoCorrect for LegacyConstructorRule.
Raphael Randschau -
Improve performance of
LineLengthRule.
Norio Nomura -
Add ConditionalBindingCascadeRule.
Aaron McTavish #202 -
Add LegacyConstantRule.
Aaron McTavish #319 -
Add opt-in rule to encourage checking
isEmptyover comparingcountto zero.
JP Simard #202 -
Add opt-in "Missing Docs" rule to detect undocumented public declarations.
JP Simard
- None.
- None.
- Improve performance by reducing calls to SourceKit.
Norio Nomura
-
Fix homebrew deployment issues.
Norio Nomura -
AutoCorrect for TrailingNewlineRule only removes at most one line.
John Estropia -
valid_docsdid not detect tuple as return value.
Norio Nomura #324 -
Escape strings when using CSV reporter.
JP Simard
http://www.amazon.com/Magic-Drying-Fluff-Balls-Softening/dp/B001EIW1SG
- None.
- None.
-
Always fail if a YAML configuration file was found but could not be parsed.
JP Simard #310 -
Make commands with modifiers work for violations with line-only locations.
JP Simard #316
- Remove
Location.init(file:offset:)in favor of the more explicitLocation.init(file:byteOffset:)&Location.init(file:characterOffset:).
JP Simard
-
Add
checkstylereporter to generate XML reports in the Checkstyle 4.3 format. JP Simard #277 -
Support command comment modifiers (
previous,this&next) to limit the command's scope to a single line. JP Simard #222 -
Add nested
.swiftlint.ymlconfiguration support.
Scott Hoyt #299
-
Fix an
NSRangeExceptioncrash.
Norio Nomura #294 -
The
valid_docsrule now handles multibyte characters.
Norio Nomura #295
- None.
-
Improve autocorrect for OpeningBraceRule.
Yasuhiro Inami -
Add autocorrect for ColonRule.
Brian Partridge -
Add ClosingBraceRule.
Yasuhiro Inami
- None.
- Performance improvements & unicode fixes (via SourceKitten).
Norio Nomura
- Fix
ValidDocsRulefalse positive when documenting functions with closure parameters.
diogoguimaraes #267
- None.
- None.
-
Make linting faster than 0.5.0, but slower than 0.4.0
Norio Nomura #119 -
Re-introduce
--use-script-input-filesoption forlint&autocorrectcommands. Should also fix some issues when running SwiftLint from an Xcode build phase.
JP Simard #264
init()is no longer a member of theRuleprotocol.
-
Add legacy constructor rule.
Marcelo Fabri #202 -
The
VariableNameRulenow allows variable names when the entire name is capitalized. This allows stylistic usage common in cases likeURLand other acronyms.
Marcelo Fabri #161 -
Add
autocorrectcommand to automatically correct certain violations (currently onlytrailing_newline,trailing_semicolon&trailing_whitespace).
JP Simard #5 -
Allow to exclude files from
includeddirectory withexcluded.
Michal Laskowski
- API: Rename RuleExample to RuleDescription, remove StyleViolationType and
combine Rule().identifier and Rule().example into Rule.description.
JP Simard #183
-
The
VariableNameRulenow allows capitalized variable names when they are declared static. This allows stylistic usage common in cases likeOptionSetTypesubclasses.
Will Fleming -
Add
VariableNameMaxLengthRuleandVariableNameMinLengthRuleparameter rules. Remove length checks onVariableNameRule.
Mickael Morier -
Add trailing semicolon rule.
JP Simard -
Add force try rule.
JP Simard -
Support linting from Input Files provided by Run Script Phase of Xcode with
--use-script-input-files.
Norio Nomura #193
-
All rules now print their identifiers in reports.
JP Simard #180 -
ControlStatementRulenow detects all violations.
Mickael Morier #187 -
ControlStatementRuleno longer triggers a violation for acceptable use of parentheses.
Mickael Morier #189 -
Nesting rule no longer triggers a violation for enums nested one level deep.
JP Simard #190 -
ColonRulenow triggers a violation even if equal operator is collapse to type and value.
Mickael Morier #135 -
Fix an issue where logs would be printed asynchronously over each other.
JP Simard #200
swiftlint rulesnow just prints a list of all available rules and their identifiers.
-
Support for Swift 2.1.
JP Simard -
Added
StatementPositionRuleto make sure that catch, else if and else statements are on the same line as closing brace preceding them and after one space.
Alex Culeva -
Added
Comma Ruleto ensure there is a single space after a comma.
Alex Culeva -
Add rule identifier to all linter reports.
zippy1978 -
Add
OpeningBraceRuleto make sure there is exactly a space before opening brace and it is on the same line as declaration. Alex Culeva -
Print to stderr for all informational logs. Only reporter outputs is logged to stdout.
JP Simard -
JSON and CSV reporters now only print at the very end of the linting process.
JP Simard -
Add support for
guardstatements to ControlStatementRule.
David Potter -
Lint parameter variables.
JP Simard
-
ViolationSeveritynow has an associated type ofStringand two members:.Warningand.Error.
JP Simard #113
-
Configure SwiftLint via a YAML file: Supports
disabled_rules,included,excludedand passing parameters to parameterized rules. Pass a configuration file path to--config, defaults to.swiftlint.yml.
JP Simard #1 #3 #20 #26 -
Updated
TypeNameRuleandVariableNameRuleto allow private type & variable names to start with an underscore. JP Simard -
Disable and re-enable rules from within source code comments using
// swiftlint:disable $IDENTIFIERand// swiftlint:enable $IDENTIFIER.
JP Simard #4 -
Add
--strictlint flag which makes the lint fail if there are any warnings.
Keith Smiley -
Violations are now printed to stderr.
Keith Smiley -
Custom reporters are now supported. Specify a value for the
reporter:key in your configuration file. Available reporters arexcode(default),json,csv.
JP Simard #42
-
Improve performance of
TrailingWhitespaceRule.
Keith Smiley -
Allow newlines in function return arrow.
JP Simard
- None.
-
Added
OperatorFunctionWhitespaceRuleto make sure that you use whitespace around operators when defining them.
Akira Hirakawa #60 -
Added
ReturnArrowWhitespaceRuleto make sure that you have 1 space before return arrow and return type.
Akira Hirakawa -
Support linting from standard input (use
--use-stdin).
JP Simard #78 -
Improve performance of
TrailingNewlineRule.
Keith Smiley -
Lint parentheses around switch statements.
Keith Smiley
- None.
-
The
RuleandASTRuleprotocol members are now non-static.
aarondaub -
Split
RuleintoRuleandParameterizedRuleprotocols.
aarondaub #21
-
Added a command line option
--pathto specify a path to lint.
Lars Lockefeer #16 -
swiftlint now returns a non-zero error code when a warning of high-severity or above is found in the source files being linted.
Pat Wallace #30 -
Added
rulescommand to display which rules are currently applied along with examples.
Chris Eidhof -
Cache parsing to reduce execution time by more than 50%.
Nikolaj Schumacher -
Added
ControlStatementRuleto make sure that if/for/while/do statements do not wrap their conditionals in parentheses.
Andrea Mazzini -
Character position is now included in violation location where appropriate.
JP Simard #62 -
The following rules now conform to
ASTRule: FunctionBodyLength, Nesting, TypeBodyLength, TypeName, VariableName.
JP Simard
First Version!