Skip to content

Latest commit

 

History

History
1691 lines (1209 loc) · 59.1 KB

CHANGELOG.md

File metadata and controls

1691 lines (1209 loc) · 59.1 KB

Master

Breaking
  • None.
Enhancements
  • Performance improvements to generic_type_name, redundant_nil_coalescing, mark, first_where and vertical_whitespace rules.
    Marcelo Fabri
Bug Fixes

0.16.1: Commutative Fabric Sheets

Breaking
  • None.
Enhancements
Bug Fixes
  • Fix false positives on shorthand_operator rule.
    Marcelo Fabri #1156 #1163

  • Fix false positive on redundant_optional_initialization rule.
    Marcelo Fabri #1159

  • Fix false positive on operator_usage_whitespace rule with decimal literals in exponent format.
    Marcelo Fabri #1153

  • Fix excluded configuration not excluding files.
    Marcelo Fabri #1166

  • Disable commutative operations on shorthand_operator rule.
    Marcelo Fabri #1182 #1183 #1211

  • Fix crash when running in a Sandboxed environment, which also fixes Homebrew distribution. Set the SWIFTLINT_SWIFT_VERSION environment variable to either 2 or 3 to force that operation mode, bypassing the Swift version determined from SourceKit.
    JP Simard

0.16.0: Maximum Energy Efficiency Setting

Breaking
  • Several API breaking changes were made to conform to the Swift 3 API Design Guidelines. We apologize for any inconvenience this may have caused.
Enhancements
  • 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_operator rule correctable.
    Vojta Stavik

  • Add vertical_parameter_alignment rule 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_protocol rule that warns against protocol declarations that aren't marked as : class or @objc.
    Marcelo Fabri #1039

  • Add correctable redundant_optional_initialization rule that warns against initializing optional variables with nil.
    Marcelo Fabri #1052

  • redundant_nil_coalescing rule is now correctable.
    Marcelo Fabri

  • Make number_separator rule correctable.
    Marcelo Fabri

  • empty_parentheses_with_trailing_closure rule is now correctable.
    Marcelo Fabri

  • Add correctable redundant_void_return rule that warns against explicitly adding -> Void to functions.
    Marcelo Fabri #1066

  • Add an opt-in rule that enforces alphabetical sorting of imports.
    Scott Berrevoets #900

  • type_name rule forces enum values to be UpperCamelCase again when used with Swift 2.3.
    Marcelo Fabri #1090

  • Make weak_delegate rule ignore computed properties.
    Rafael Machado #1089

  • Add object_literal opt-in rule that warns against using image and color inits that can be replaced for #imageLiteral or #colorLiteral in Swift 3.
    Marcelo Fabri #1060

  • Now number_separator rule can be configured with a minimum length.
    Marcelo Fabri #1109

  • Add compiler_protocol_init rule that flags usage of initializers declared in protocols used by the compiler such as ExpressibleByArrayLiteral that 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_tuple configurable rule that validates that tuples shouldn't have too many members.
    Marcelo Fabri #1065

  • Add generic_type_name rule that validates generic constraint type names.
    Marcelo Fabri #51

  • Update vertical_whitespace rule to allow configuration of the number of consecutive empty lines before a violation using max_empty_lines. The default value is still 1 line.
    Aaron McTavish #769

  • Add check to ignore urls in line_length rule when ignores_urls configuration is enabled.
    Javier Hernández #384

  • Add shorthand_operator rule that validates that shorthand operators should be used when possible.
    Marcelo Fabri #902

  • Allow specifying a swiftlint_version configuration 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_binding rule that will check for optional bindings not being used.
    Rafael Machado #1116

Bug Fixes
  • Ignore close parentheses on vertical_parameter_alignment rule.
    Marcelo Fabri #1042

  • syntactic_sugar rule now doesn't flag declarations that can't be fixed.
    Marcelo Fabri #928

  • Fix false positives on closure_parameter_position and unused_closure_parameter rules with Swift 2.3.
    Marcelo Fabri #1019

  • Fix crash on trailing_comma rule with Swift 2.3.
    Marcelo Fabri #921

  • Fix out of range exception in AttributesRule.
    JP Simard #1105

  • Fix variable_name and type_name rules on Linux.
    Marcelo Fabri

  • Fix linting directories with names ending with .swift.
    JP Simard

  • Fix running swiftlint version when building with Swift Package Manager.
    Marcelo Fabri #1045

  • Fix false positive on vertical_parameter_alignment rule when breaking line in a default parameter declaration.
    Marcelo Fabri #1129

0.15.0: Hand Washable Holiday Linens 🎄

Breaking
Enhancements
  • Add closure_end_indentation opt-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.

    Marcelo Fabri #326

  • operator_usage_whitespace rule is now correctable.
    Marcelo Fabri

  • implicit_getter and mark rule performance improvements.
    Marcelo Fabri

  • HTML reports now display a relative path to files.
    Jamie Edge

  • colon rule now validates colon position in dictionaries too. You can disable this new validation with the apply_to_dictionaries configuration.
    Marcelo Fabri #603

  • Add first_where opt-in rule that warns against using .filter { /* ... */ }.first in collections, as .first(where: { /* ... */ }) is often more efficient.
    Marcelo Fabri #1005

Bug Fixes

0.14.0: Super Awesome Retractable Drying Rack

Breaking
  • 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
Enhancements
  • Now builds and passes most tests on Linux using the Swift Package Manager with Swift 3. This requires libsourcekitdInProc.so to be built and located in /usr/lib, or in another location specified by the LINUX_SOURCEKIT_LIB_PATH environment variable. A preconfigured Docker image is available on Docker Hub by the ID of norionomura/sourcekit:302.
    JP Simard Norio Nomura #732

  • Add dynamic_inline rule to discourage combination of @inline(__always) and dynamic function attributes.
    Daniel Duan

  • Add number_separator opt-in rule that enforces that underscores are used as thousand separators in large numbers.
    Marcelo Fabri #924

  • Add file_header opt-in rule that warns when a file contains a copyright comment header, such as the one Xcode adds by default.
    Marcelo Fabri #844

  • FunctionParameterCountRule now ignores initializers.
    Denis Lebedev #544

  • Add EmojiReporter: a human friendly reporter.
    Michał Kałużny

  • Add redundant_string_enum_value rule that warns against String enums with redundant value assignments.
    Marcelo Fabri #946

  • Add attributes opt-in rule which validates if an attribute (@objc, @IBOutlet, @discardableResult, etc) is in the right position:

    • If the attribute is @IBAction or @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 the always_on_same_line and always_on_line_above keys.

    Marcelo Fabri #846

  • Add empty_parentheses_with_trailing_closure rule that checks for empty parentheses after method call when using trailing closures.
    Marcelo Fabri #885

  • Add closure_parameter_position rule that validates that closure parameters are in the same line as the opening brace.
    Marcelo Fabri #931

  • type_name rule now validates typealias and associatedtype too.
    Marcelo Fabri #49 #956

  • Add ProhibitedSuperRule opt-in rule that warns about methods calling to super that should not, for example UIViewController.loadView().
    Aaron McTavish #970

  • Add correctable void_return rule to validate usage of -> Void over -> ().
    Marcelo Fabri JP Simard #964

  • Add correctable empty_parameters rule to validate usage of () -> over Void -> .
    Marcelo Fabri #573

  • Add operator_usage_whitespace opt-in rule to validate that operators are surrounded by a single whitespace when they are being used.
    Marcelo Fabri #626

  • Add unused_closure_parameter correctable 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_enumerated rule that warns against unused indexes when using .enumerated() on a for loop, e.g. for (_, foo) in bar.enumerated().
    Marcelo Fabri #619

Bug Fixes
  • Fix weak_delegate rule reporting a violation for variables containing but not ending in delegate.
    Phil Webster

  • Fix weak_delegate rule reporting a violation for variables in protocol declarations.
    Marcelo Fabri #934

  • Fix trailing_comma rule 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_position rule when there are multi-byte characters in the file.
    Marcelo Fabri

0.13.2: Light Cycle

Breaking
  • None.
Enhancements
  • TrailingCommaRule now only triggers when a declaration is multi-line when using mandatory_comma: true.
    Marcelo Fabri #910 #911
Bug Fixes
  • Fix MarkRule reporting a violation for // MARK: -, which is valid.
    JP Simard #778

0.13.1: Heavy Cycle

Breaking
  • None.
Enhancements
  • Add ImplicitGetterRule to warn against using get on computed read-only properties.
    Marcelo Fabri #57

  • Add WeakDelegateRule rule to enforce delegate instance variables to be marked as weak.
    Olivier Halligon

  • Add SyntacticSugar rule that enforces that shorthanded syntax should be used when possible, for example [Int] instead of Array<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 #881

  • closure_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 the mandatory_comma configuration.
    Marcelo Fabri #883

  • Add support for fileprivate in PrivateOutletRule and PrivateUnitTestRule.
    Marcelo Fabri #781 #831

  • Make MarkRule correctable.
    kohtenko

Bug Fixes
  • Rule out a few invalid @IBInspectable cases in valid_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 #863

  • switch_case_on_newline rule should ignore trailing comments.
    Marcelo Fabri #874

  • switch_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

0.13.0: MakeYourClothesCleanAgain

Breaking
  • None.
Enhancements
  • Add ignores_comment configuration for trailing_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 #770

  • Adds allow_private_set configuration for the private_outlet rule.
    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 SwitchCaseOnNewlineRule opt-in rule that enforces a newline after case pattern: in a switch.
    Marcelo Fabri #681

  • Add ValidIBInspectableRule rule that checks if @IBInspectable declarations are valid. An @IBInspectable is valid if:

    • It's declared as a var (not let)
    • Its type is explicit (not inferred)
    • Its type is one of the supported types

    Marcelo Fabri #756

  • Add ExplicitInitRule opt-in rule to discourage calling init 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 #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: ConditionalReturnsOnNewline now respects severity configuration.
    Rohan Dhaimade #783

  • Fixed: ConditionalReturnsOnNewline now checks if return is a keyword, avoiding false positives.
    Marcelo Fabri #784

  • ForceUnwrappingRule did not recognize force unwraps in return statements using subscript.
    Norio Nomura #813

0.12.0: Vertical Laundry

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 to lint command to facilitate running all rules, even opt-in and disabled ones, ignoring whitelist_rules. JP Simard #1170
Bug Fixes
  • Made Vertical Whitespace Rule added in 0.11.2 opt-in due to performance issues.
    JP Simard #772

0.11.2: Communal Clothesline

This release has seen a phenomenal uptake in community contributions!

Breaking
  • None.
Enhancements
Bug Fixes

0.11.1: Cuddles... Or Else!

Breaking
  • None.
Enhancements
  • Added statement_mode configuration to the statement_position rule. The
    default mode keeps the current SwiftLint behavior of keeping else and catch statements on the same line as the closing brace before them. The uncuddled_elseconfiguration requires the else and catch 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

0.11.0: Laundromat Format

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. The SwiftLintFramework.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 to autocorrect 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 Hardy

  • Added the user-configurable option ignores_empty_lines to the trailing_whitespace rule. It can be used to control whether the TrailingWhitespaceRule should report and correct whitespace-indented empty lines. Defaults to false. Added unit tests.
    Reimar Twelker

Bug Fixes
  • 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

0.10.0: laundry-select edition

Breaking
  • None.
Enhancements
  • Now libclang.dylib and sourcekitd.framework are dynamically loaded at runtime by SourceKittenFramework to use the versions included in the Xcode version specified by xcode-select -p or custom toolchains.
    Norio Nomura #167

  • Add LegacyCGGeometryFunctionsRule rule.
    Sarr Blaise #625

  • SwiftLint no longer crashes when SourceKitService crashes.
    Norio Nomura

  • Rewrite 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 #593

  • ClosingBraceRule no longer triggers across line breaks.
    Josh Friend #592

  • LegacyConstantRule and LegacyConstructorRule failed to autocorrect.
    Norio Nomura #623

0.9.2: Multiple Exhaust Codes

Breaking
  • None.
Enhancements
  • Return different exit codes to distinguish between types of errors:

    • 0: No errors, maybe warnings in non-strict mode
    • 1: Usage or system error
    • 2: Style violations of severity "Error"
    • 3: No style violations of severity "Error", but violations of severity "warning" with --strict
      JP Simard #166
  • VariableNameRule now accepts symbols starting with more than one uppercase letter to allow for names like XMLString or MIMEType.
    Erik Aigner #566

Bug Fixes

0.9.1: Air Duct Cleaning

Breaking
  • None.
Enhancements
  • None.
Bug Fixes

0.9.0: Appliance Maintenance

Breaking
  • Linter.reporter has been removed and Configuration.reporterFromString(_:) has been renamed to a free function: reporterFromString(_:).
    JP Simard

  • _ConfigProviderRule & ConfigurableRule have been removed and their requirements have been moved to Rule.
    JP Simard

  • Configuration(path:optional:silent) has been changed to Configuration(path:rootPath:optional:quiet:).
    JP Simard

  • The static function Configuration.rulesFromDict(_:ruleList:) has been moved to an instance method: RuleList.configuredRulesWithDictionary(_:).
    JP Simard

  • The rules parameter in the Configuration initializer has been renamed to configuredRules.
    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 --config command line parameter and use_nested_configs configuration key are unaffected.
    JP Simard

  • The use_nested_configs configuration key has been deprecated and its value is now ignored. Nested configuration files are now always considered.
    JP Simard

Enhancements
  • swiftlint lint now accepts an optional --reporter parameter which overrides existing reporter values in the configuration file. Choose between xcode (default), json, csv or checkstyle.
    JP Simard #440

  • swiftlint rules now shows a configuration description for all rules.
    JP Simard

  • lint and autocorrect commands now accept a --quiet flag 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: Source is equivalent to included:\n - Source.
    JP Simard #120

  • Improve performance of FunctionParameterCountRule.
    Norio Nomura

  • Improve performance of ColonRule.
    Norio Nomura

Bug Fixes
  • 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 LegacyConstructorRule from correcting legacy constructors in string literals.
    JP Simard #466

  • Fixed an issue where variable_name or type_name would always report a violation when configured with only a warning value on either min_length or max_length.
    JP Simard #522

0.8.0: High Heat

Breaking
  • Setting only warning on SeverityLevelsConfig rules now disables the error value.
    Robin Kunde #409

  • enabled_rules has been renamed to opt_in_rules.
    Daniel Beard

Enhancements
  • Add whitelist_rules rule 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/while conditions to allow opening brace to be on a new line in OpeningBraceRule.
    Scott Hoyt #355

  • The rules command 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

Bug Fixes
  • Fix more false positives in ValidDocsRule.
    diogoguimaraes #451

  • Fix trailing_newline autocorrect to handle more than one violation per line.
    Daniel Beard #465

  • Fix complexity measurement for switch statements in CyclomaticComplexityRule.
    Denis Lebedev #461

0.7.2: Appliance Manual

Breaking
  • None.
Enhancements
  • None.
Bug Fixes

0.7.1: Delicate Cycle

Breaking
  • None.
Enhancements
Bug Fixes

0.7.0: Automatic Permanent Press

Breaking
  • Replaced all uses of XPCDictionary with [String: SourceKitRepresentable].
    JP Simard

  • VariableNameMinLengthRule and VariableNameMaxLengthRule have been removed. VariableNameRule now has this functionality.
    Scott Hoyt

  • ViolationLevelRule has been removed. This functionality is now provided by ConfigProviderRule and SeverityLevelsConfig.
    Scott Hoyt

Enhancements
  • TypeBodyLengthRule now does not count comment or whitespace lines.
    Marcelo Fabri #369

  • FunctionBodyLengthRule now 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

  • TypeNameRule and VariableNameRule conform to ConfigProviderRule using NameConfig to support min_length, max_length, and excluded names.
    Scott Hoyt #388 #259 #191

  • Add CyclomaticComplexityRule.
    Denis Lebedev

Bug Fixes
  • Fix crash caused by infinite recursion when using nested config files.
    JP Simard #368

  • Fix crash when file contains NULL character.
    Norio Nomura #379

0.6.0: Steam Cycle

Breaking
  • ParameterizedRule is removed. Use ConfigurableRule instead.
    Scott Hoyt #353

  • To activate a Rule, it must be added to the global masterRuleList.
    Scott Hoyt

Enhancements
  • ConfigurableRule protocol allows for improved rule configuration. See CONTRIBUTING for more details.
    Scott Hoyt #303

  • VariableNameMinLengthRule now supports excluding certain variable names (e.g. "id").
    Scott Hoyt #231

  • ViolationLevelRule provides default ConfigurableRule implementation 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

  • Opt-in rules are now supported.
    JP Simard #256

  • Add LegacyConstantRule.
    Aaron McTavish #319

  • Add opt-in rule to encourage checking isEmpty over comparing count to zero.
    JP Simard #202

  • Add opt-in "Missing Docs" rule to detect undocumented public declarations.
    JP Simard

Bug Fixes
  • None.

0.5.6: Bug FixLint

Breaking
  • None.
Enhancements
  • Improve performance by reducing calls to SourceKit.
    Norio Nomura
Bug Fixes

0.5.5: Magic Drying Fluff Balls™

http://www.amazon.com/Magic-Drying-Fluff-Balls-Softening/dp/B001EIW1SG

Breaking
  • None.
Enhancements
  • None.
Bug Fixes
  • 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

0.5.4: Bounce™

Breaking
  • Remove Location.init(file:offset:) in favor of the more explicit Location.init(file:byteOffset:) & Location.init(file:characterOffset:).
    JP Simard
Enhancements
  • Add checkstyle reporter 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.yml configuration support.
    Scott Hoyt #299

Bug Fixes

0.5.3: Mountain Scent

Breaking
  • None.
Enhancements
Bug Fixes

0.5.2: Snuggle™

Breaking
  • None.
Enhancements
  • Performance improvements & unicode fixes (via SourceKitten).
    Norio Nomura
Bug Fixes
  • Fix ValidDocsRule false positive when documenting functions with closure parameters.
    diogoguimaraes #267

0.5.1: Lint Tray Malfunction

Breaking
  • None.
Enhancements
  • None.
Bug Fixes
  • Make linting faster than 0.5.0, but slower than 0.4.0
    Norio Nomura #119

  • Re-introduce --use-script-input-files option for lint & autocorrect commands. Should also fix some issues when running SwiftLint from an Xcode build phase.
    JP Simard #264

0.5.0: Downy™

Breaking
  • init() is no longer a member of the Rule protocol.
Enhancements
  • Add legacy constructor rule.
    Marcelo Fabri #202

  • The VariableNameRule now allows variable names when the entire name is capitalized. This allows stylistic usage common in cases like URL and other acronyms.
    Marcelo Fabri #161

  • Add autocorrect command to automatically correct certain violations (currently only trailing_newline, trailing_semicolon & trailing_whitespace).
    JP Simard #5

  • Allow to exclude files from included directory with excluded.
    Michal Laskowski

Bug Fixes
  • Statement position rule no longer triggers for non-keyword uses of catch and else.
    JP Simard #237

  • Fix issues with multi-byte characters.
    JP Simard #234

0.4.0: Wrinkle Release

Breaking
  • API: Rename RuleExample to RuleDescription, remove StyleViolationType and combine Rule().identifier and Rule().example into Rule.description.
    JP Simard #183
Enhancements
  • The VariableNameRule now allows capitalized variable names when they are declared static. This allows stylistic usage common in cases like OptionSetType subclasses.
    Will Fleming

  • Add VariableNameMaxLengthRule and VariableNameMinLengthRule parameter rules. Remove length checks on VariableNameRule.
    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

Bug Fixes
  • All rules now print their identifiers in reports.
    JP Simard #180

  • ControlStatementRule now detects all violations.
    Mickael Morier #187

  • ControlStatementRule no 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

  • ColonRule now 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

0.3.0: Wrinkly Rules

Breaking
  • swiftlint rules now just prints a list of all available rules and their identifiers.
Enhancements
  • Support for Swift 2.1.
    JP Simard

  • Added StatementPositionRule to 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 Rule to ensure there is a single space after a comma.
    Alex Culeva

  • Add rule identifier to all linter reports.
    zippy1978

  • Add OpeningBraceRule to 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 guard statements to ControlStatementRule.
    David Potter

  • Lint parameter variables.
    JP Simard

Bug Fixes
  • Custom reporters are now supported even when not running with --use-stdin.
    JP Simard #151

  • Deduplicate files in the current directory.
    JP Simard #154

0.2.0: Tumble Dry

Breaking
  • SwiftLint now exclusively supports Swift 2.0.
    JP Simard #77

  • ViolationSeverity now has an associated type of String and two members: .Warning and .Error.
    JP Simard #113

Enhancements
  • Configure SwiftLint via a YAML file: Supports disabled_rules, included, excluded and passing parameters to parameterized rules. Pass a configuration file path to --config, defaults to .swiftlint.yml.
    JP Simard #1 #3 #20 #26

  • Updated TypeNameRule and VariableNameRule to 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 $IDENTIFIER and // swiftlint:enable $IDENTIFIER.
    JP Simard #4

  • Add --strict lint 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 are xcode (default), json, csv.
    JP Simard #42

Bug Fixes
  • Improve performance of TrailingWhitespaceRule.
    Keith Smiley

  • Allow newlines in function return arrow.
    JP Simard

0.1.2: FabricSoftenerRule

Breaking
  • None.
Enhancements
  • Added OperatorFunctionWhitespaceRule to make sure that you use whitespace around operators when defining them.
    Akira Hirakawa #60

  • Added ReturnArrowWhitespaceRule to 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

Bug Fixes
  • None.

0.1.1: Top Loading

Breaking
  • The Rule and ASTRule protocol members are now non-static.
    aarondaub

  • Split Rule into Rule and ParameterizedRule protocols.
    aarondaub #21

Enhancements
  • Added a command line option --path to 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 rules command 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 ControlStatementRule to 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

Bug Fixes
  • Trailing newline and file length violations are now displayed in Xcode.
    JP Simard #43

0.1.0: Fresh Out Of The Dryer

First Version!