SwiftLint v0.49.0 Release Notes
-
๐ Note: The default branch for the SwiftLint git repository will be renamed from โก๏ธ
master
tomain
on September 1st. Please update any code or automation accordingly.๐ฅ Breaking
๐ SwiftLint now requires Swift 5.6 or higher to build, and macOS 12 or higher to run.
JP Simard๐จ Code Climate reports now use SHA256 strings as the issue fingerprint values.
JP Simard๐ Make
comma_inheritance
an opt-in rule.
Steve Madsen #4027๐ The
autocorrect
command that was deprecated in 0.43.0 has now been completely removed. Use--fix
instead.
JP Simardโ Remove the
AutomaticTestableRule
protocol. All examples listed in rules are now tested automatically to make sure they are correct.
SimplyDanny๐ Deprecate the
--in-process-sourcekit
command line flag. SwiftLint now always uses an in-process SourceKit.
JP Simard
Experimental
- None.
โจ Enhancements
Make
duplicate_imports
rule correctable. Fixduplicate_imports
rule reporting redundant violations when more than one duplicate is present.
Timofey Solonin๐ Support for building SwiftLint with bazel.
JP Simard๐ Support for writing custom private native rules when building with bazel.
JP Simard Keith Smiley #3516๐ Make
comma
rule about 10x faster, finding some previously missed cases and fixing some previously wrong corrections.
JP Simard๐ Make
colon
rule about 7x faster, finding some previously missed cases.
JP Simard๐ Make
closure_spacing
rule about 9x faster, finding some previously missed cases and fixing some previously wrong corrections.
JP Simard SimplyDanny #4090Introduce new configuration option
include_compiler_directives
(true
by default) for theindentation_width
rule that allows to ignore compiler directives in the indentation analysis. This is especially useful if one (or a formatter) prefers to have compiler directives always at the very beginning of a line.
SimplyDanny #4030Enable (recursive) globs in
included
file paths.
sarastro-nlCustom rules are now broken down per rule instead of in aggregate in
--benchmark
.
JP Simard๐จ The
version
command now has an optional--verbose
flag that prints out the full version info, notably the build ID, which can be used to determine if twoswiftlint
executables are identical.
JP SimardUpdate documentation for
multiline_arguments_brackets
andmultiline_literal_brackets
to make it immediately obvious that common examples will trigger.
chrisjf #4060๐ The
--compile-commands
argument can now parse SwiftPM yaml files produced when runningswift build
at.build/{debug,release}.yaml
.
JP SimardAdd new configuration option
allowed_no_space_operators
tooperator_usage_whitespace
rule. It allows to specify custom operators which shall not be considered by the rule.
imben123โ Add new protocols to remove some boilerplate involved in writing SwiftSyntax-based rules.
JP Simard
๐ Bug Fixes
Fix false positive in
self_in_property_initialization
rule when using closures insidedidSet
and other accessors.
Marcelo Fabri #4041๐ Fix false positive in
Duplicated Key in Dictionary Literal Violation
rule when using keys that are generated at runtime with the same source code.
OrEliyahu #4012๐ Fix false positive in
yoda_condition
rule by basing it on SwiftSyntax.
SimplyDanny #4081๐ Fix false negatives in
first_where
rule when filtering array of dictionaries with String keys.
KS1019๐ Fix broken correction for
explicit_init
rule.
KS1019