Skip to content

0.9.0: Appliance Maintenance

Choose a tag to compare

@jpsim jpsim released this 12 Feb 20:46

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