SwiftLint v0.9.0 Release Notes

  • ๐Ÿ’ฅ 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