- Now
type_name
allows lowercase enum values to match the Swift API Design Guidelines. Jorge Bernal #654
- Improve error messages for invalid configuration files. Brian Hardy
- Fix false positive in conditional binding cascade violation
Norio Nomura #642
- None.
-
Now
libclang.dylib
andsourcekitd.framework
are dynamically loaded at runtime by SourceKittenFramework to use the versions included in the Xcode version specified byxcode-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
-
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
andLegacyConstructorRule
failed toautocorrect
.
Norio Nomura #623
- None.
-
Return different exit codes to distinguish between types of errors:
-
VariableNameRule
now accepts symbols starting with more than one uppercase letter to allow for names like XMLString or MIMEType.
Erik Aigner #566
-
Avoid overwriting files whose contents have not changed.
Neil Gall #574 -
Fix
CommaRule
mismatch between violations and corrections.
Norio Nomura #466 -
Fix more false positives in
ForceUnwrappingRule
.
Norio Nomura #546 #547
- None.
- None.
-
Fix force unwrap rule missed cases with quotes.
Norio Nomura #535 -
Fix issues with nested
.swiftlint.yml
file resolution.
Norio Nomura #543
-
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 #479 -
All 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 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
-
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
-
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
ortype_name
would always report a violation when configured with only awarning
value on eithermin_length
ormax_length
.
JP Simard #522
-
Setting only warning on
SeverityLevelsConfig
rules now disables the error value.
Robin Kunde #409 -
enabled_rules
has been renamed toopt_in_rules
.
Daniel Beard
-
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 inOpeningBraceRule
.
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
-
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
- None.
- None.
- Fix several false positives in
ValidDocsRule
.
diogoguimaraes #375
- None.
-
Improve performance of
MissingDocsRule
.
Norio Nomura -
Added
CustomRules
.
Scott Hoyt
#123 -
Added opt-in
ForceUnwrappingRule
to issue warnings for all forced unwrappings.
Benjamin Otto #55
- Fix several false positives in
ValidDocsRule
.
diogoguimaraes #375
-
Replaced all uses of
XPCDictionary
with[String: SourceKitRepresentable]
.
JP Simard -
VariableNameMinLengthRule
andVariableNameMaxLengthRule
have been removed.VariableNameRule
now has this functionality.
Scott Hoyt -
ViolationLevelRule
has been removed. This functionality is now provided byConfigProviderRule
andSeverityLevelsConfig
.
Scott Hoyt
-
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
Rule
s are now configurable in at least their severity:SeverityConfig
.
Scott Hoyt #371 #130 #268 -
TypeNameRule
andVariableNameRule
conform toConfigProviderRule
usingNameConfig
to supportmin_length
,max_length
, andexcluded
names.
Scott Hoyt #388 #259 #191 -
Add
CyclomaticComplexityRule
.
Denis Lebedev
-
Fix crash caused by infinite recursion when using nested config files.
JP Simard #368 -
Fix crash when file contains NULL character.
Norio Nomura #379
-
ParameterizedRule
is removed. UseConfigurableRule
instead.
Scott Hoyt #353 -
To activate a
Rule
, it must be added to the globalmasterRuleList
.
Scott Hoyt
-
ConfigurableRule
protocol allows for improved rule configuration. SeeCONTRIBUTING
for more details.
Scott Hoyt #303 -
VariableNameMinLengthRule
now supports excluding certain variable names (e.g. "id").
Scott Hoyt #231 -
ViolationLevelRule
provides defaultConfigurableRule
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 -
Add LegacyConstantRule.
Aaron McTavish #319 -
Add opt-in rule to encourage checking
isEmpty
over comparingcount
to zero.
JP Simard #202 -
Add opt-in "Missing Docs" rule to detect undocumented public declarations.
JP Simard
- None.
- None.
- Improve performance by reducing calls to SourceKit.
Norio Nomura
-
Fix homebrew deployment issues.
Norio Nomura -
AutoCorrect for TrailingNewlineRule only removes at most one line.
John Estropia -
valid_docs
did not detect tuple as return value.
Norio Nomura #324 -
Escape strings when using CSV reporter.
JP Simard
http://www.amazon.com/Magic-Drying-Fluff-Balls-Softening/dp/B001EIW1SG
- None.
- None.
-
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
- Remove
Location.init(file:offset:)
in favor of the more explicitLocation.init(file:byteOffset:)
&Location.init(file:characterOffset:)
.
JP Simard
-
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
-
Fix an
NSRangeException
crash.
Norio Nomura #294 -
The
valid_docs
rule now handles multibyte characters.
Norio Nomura #295
- None.
-
Improve autocorrect for OpeningBraceRule.
Yasuhiro Inami -
Add autocorrect for ColonRule.
Brian Partridge -
Add ClosingBraceRule.
Yasuhiro Inami
- None.
- Performance improvements & unicode fixes (via SourceKitten).
Norio Nomura
- Fix
ValidDocsRule
false positive when documenting functions with closure parameters.
diogoguimaraes #267
- None.
- None.
-
Make linting faster than 0.5.0, but slower than 0.4.0
Norio Nomura #119 -
Re-introduce
--use-script-input-files
option forlint
&autocorrect
commands. Should also fix some issues when running SwiftLint from an Xcode build phase.
JP Simard #264
init()
is no longer a member of theRule
protocol.
-
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 likeURL
and other acronyms.
Marcelo Fabri #161 -
Add
autocorrect
command to automatically correct certain violations (currently onlytrailing_newline
,trailing_semicolon
&trailing_whitespace
). JP Simard #5 -
Allow to exclude files from
included
directory withexcluded
.
Michal Laskowski
- API: Rename RuleExample to RuleDescription, remove StyleViolationType and
combine Rule().identifier and Rule().example into Rule.description.
JP Simard #183
-
The
VariableNameRule
now allows capitalized variable names when they are declared static. This allows stylistic usage common in cases likeOptionSetType
subclasses.
Will Fleming -
Add
VariableNameMaxLengthRule
andVariableNameMinLengthRule
parameter rules. Remove length checks onVariableNameRule
.
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
-
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
swiftlint rules
now just prints a list of all available rules and their identifiers.
-
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
-
ViolationSeverity
now has an associated type ofString
and two members:.Warning
and.Error
.
JP Simard #113
-
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
andVariableNameRule
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 arexcode
(default),json
,csv
.
JP Simard #42
-
Improve performance of
TrailingWhitespaceRule
.
Keith Smiley -
Allow newlines in function return arrow.
JP Simard
- None.
-
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
- None.
-
The
Rule
andASTRule
protocol members are now non-static.
aarondaub -
Split
Rule
intoRule
andParameterizedRule
protocols.
aarondaub #21
-
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
First Version!