Skip to content

Releases: realm/SwiftLint

0.12.0: Vertical Laundry

24 Aug 20:07
0c605fb
Compare
Choose a tag to compare
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
  • None.
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

23 Aug 18:58
0026f30
Compare
Choose a tag to compare

This release has seen a phenomenal uptake in community contributions!

Thanks to our many contributors: @AliSoftware, @bootstraponline, @bsarr007, @cfilipov, @d-ronnqvist, @daniel-beard, @freak4pc, @HaloZero, @krodak, @masters3d, @matthewellis, @mohpor and @woodhamgh.

Breaking
  • None.
Enhancements
Bug Fixes

0.11.1: Cuddles... Or Else!

11 Jun 03:07
Compare
Choose a tag to compare

Support for else on new line (uncuddled) and LegacyCGGeometryFunctionsRule fixes.

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

08 Jun 22:40
Compare
Choose a tag to compare

The big news in this release is that autocorrect will now optionally re-indent your Swift files like Xcode does.

Big thanks to Jorge Bernal, Norio Nomura, Brian Hardy, Reimar Twelker & Andrew Rahn for contributing to this release!

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

27 Apr 19:11
Compare
Choose a tag to compare

The big news in this release is that now SwiftLint will use the version of SourceKit & Xcode you have xcode-selected, and SwiftLint will no longer crash when SourceKit does! 🎉

Here's the full list of changes:

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

15 Mar 22:30
Compare
Choose a tag to compare
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

16 Feb 21:40
Compare
Choose a tag to compare
Breaking
  • None.
Enhancements
  • None.
Bug Fixes

0.9.0: Appliance Maintenance

12 Feb 20:46
Compare
Choose a tag to compare

This is a big release, with lots of breaking changes and deprecations for users of SwiftLintFramework. If we've removed functionality from the framework's public API that you were depending on, please let us know by filing an issue so we can consider adding it back in.

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

06 Feb 03:45
Compare
Choose a tag to compare
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

29 Jan 01:14
Compare
Choose a tag to compare
Breaking
  • None.
Enhancements
  • None.
Bug Fixes