SwiftLint v0.9.0 Release Notes
-
๐ฅ Breaking
๐
Linter.reporter
has been removed andConfiguration.reporterFromString(_:)
has been renamed to a free function:reporterFromString(_:)
.
JP Simard๐ง
_ConfigProviderRule
&ConfigurableRule
have 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
rules
parameter in theConfiguration
initializer 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 #479All instances of the abbreviation "config" in the API have been expanded to "configuration". The
--config
command line parameter anduse_nested_configs
configuration key are unaffected.
JP SimardThe
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 existingreporter
values in the configuration file. Choose betweenxcode
(default),json
,csv
orcheckstyle
.
JP Simard #440๐
swiftlint rules
now shows a configuration description for all rules.
JP Simard๐
lint
andautocorrect
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 toincluded:\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 #466Fixed an issue where
variable_name
ortype_name
would always report a violation when configured with only awarning
value on eithermin_length
ormax_length
.
JP Simard #522