Releases: realm/SwiftLint
0.46.5: Laundry Studio
Breaking
- None.
Experimental
- None.
Enhancements
- None.
Bug Fixes
-
Fix
empty_parentheses_with_trailing_closure
rule when using Swift 5.6.
Marcelo Fabri
#3846 -
Fix false negatives in
closure_parameter_position
rule with Swift 5.6.
Marcelo Fabri
#3845 -
Fix regression in
last_where
rule when using Swift 5.6.
Marcelo Fabri
#3847 -
Fix regression in
unused_import
rule when using Swift 5.6.
JP Simard
#3849 -
Fix regression in
trailing_closure
rule when using Swift 5.6.
Marcelo Fabri
#3848
0.46.4: Detergent Tray
Breaking
- None.
Experimental
- None.
Enhancements
- None.
Bug Fixes
-
Ignore meta class types in
prefer_self_in_static_references
rule.
SimplyDanny
#3804 -
Ignore MARK in multiline comment, fixing cases that would previously crash or
produce invalid results when correcting.
goranche
#1749
#3841 -
Fix false positive in
EmptyEnumArgumentsRule
rule when using Swift 5.6.
Marcelo Fabri
#3850
0.46.3: Detergent Spill
Breaking
- None.
Experimental
- None.
Enhancements
- Change fingerprint generation in
CodeClimateReporter.swift
to use
the relative file path to better support CI/CD on multiple machines.
HA Pors
Bug Fixes
-
Fix crash in the
closure_end_indentation
rule when linting with
Swift 5.6.
JP Simard
#3830 -
Fix default rules section in documentation.
Natan Rolnik
#3857
0.46.2: Detergent Package
Breaking
- None.
Experimental
- None.
Enhancements
- None.
Bug Fixes
-
Fix SwiftLint.pkg installer on macOS 11 or later.
JP Simard
#3815 -
Ignore
prefer_self_in_static_references
rule in extensions
generally.
SimplyDanny
#3775 -
Fix
class_delegate_protocol
false positives when usingwhere
clause.
Steven Magdy
0.46.1: Detergent Container
Breaking
Experimental
- None.
Enhancements
-
Official Docker images are now available. See the
Docker section of the README for usage
instructions.
Francisco Javier Trujillo Mata -
Allow
unused_setter_value
for overrides.
Adrian Debbeler
#2585
Bug Fixes
-
Fix
convenience_type
false positives when using actors.
JP Simard
#3770 -
Fix false positives in the
prefer_self_in_static_references
rule.
SimplyDanny
#3768 -
Fix the regex for expiring TODO comments.
Sergei Shirokov
#3767 -
Fix crash when parsing multi-line attributes with the
attributes
rule.
JP Simard
#3761 -
Fix false positives in
unused_closure_parameter
when using
list element bindings in SwiftUI.
Paul Williamson
#3790 -
Fix the cache path not being properly set when using nested
configurations.
Andrés Cecilia Luque
0.46.0: Detergent Container
Breaking
- The
weak_delegate
rule has been deprecated due to its high false
positive rate. The identifier will become invalid in a future
release.
JP Simard
#2786
Experimental
- None.
Enhancements
-
Official Docker images are now available. See the
Docker section of the README for usage
instructions.
Francisco Javier Trujillo Mata -
Allow
unused_setter_value
for overrides.
Adrian Debbeler
#2585
Bug Fixes
-
Fix
convenience_type
false positives when using actors.
JP Simard
#3770 -
Fix false positives in the
prefer_self_in_static_references
rule.
SimplyDanny
#3768 -
Fix the regex for expiring TODO comments.
Sergei Shirokov
#3767 -
Fix crash when parsing multi-line attributes with the
attributes
rule.
JP Simard
#3761 -
Fix false positives in
unused_closure_parameter
when using
list element bindings in SwiftUI.
Paul Williamson
#3790 -
Fix the cache path not being properly set when using nested
configurations.
Andrés Cecilia Luque
0.45.1: Clothes Drying Hooks
Breaking
- None.
Experimental
- None.
Enhancements
-
Update Rule list documentation to distinguish between opt-in and
on-by-default rules.
Benny Wong -
Add opt-in
prefer_self_in_static_references
rule to warn if the
type name is used to reference static members the same type.
Prefer usingSelf
instead which is not affected by renamings.
SimplyDanny -
Add support for running SwiftLint as a
pre-commit hook.
Jesse Crocker
Hannes Ljungberg
Bug Fixes
-
Fix
unused_import
rule incorrectly consideringSwiftShims
as a
used import.
JP Simard -
Fix false positives on
large_tuple
rule when usingasync
closures.
Kaitlin Mahar
#3753 -
Fix false positive on
legacy_objc_type
rule when using
types with names that start with a legacy type name.
Isaac Ressler
#3555
0.45.0: Effectful Apparel
Breaking
- SwiftLint now requires Swift 5.4 or higher to build.
JP Simard
Experimental
- None.
Enhancements
-
Add
self_in_property_initialization
rule to catch uses ofself
inside an inline closure used for initializing a variable. In this case,
self
refers to theNSObject.self
method and likely won't be what you
expect. You can make the variablelazy
to be able to refer to the current
instance withself
or useMyClass.self
if you really want to reference
the method.
Marcelo Fabri -
Exclude
id
fromidentifier_name
by default.
Artem Garmash
#3651 -
Handle
get async
andget throws
(introduced in Swift 5.5) in the
implicit_getter
rule.
Marcelo Fabri
#3684 -
Speed up explicit type interface rule.
PaulTaykalo
#3745 -
Speed up analyzer rules.
PaulTaykalo
#3747
Bug Fixes
-
Fix a bug with the
missing_docs
rule where
excludes_inherited_types
would not be set.
Ben Fox -
Fix redundant_optional_initialization autocorrect broken
in case observer's brace exists.
Naruki Chigira
#3718 -
Fix a false positive in the
unneeded_break_in_switch
rule when
usingdo/catch
.
Marcelo Fabri
#3724 -
Speed up Computed Accessors Order rule.
PaulTaykalo
#3727 -
[Colon Rule] Fix case when comment is used in function call.
PaulTaykalo
#3740
0.44.0: Travel Size Lint Roller
Breaking
- SwiftLint now requires Swift 5.3 or higher to build.
JP Simard
Experimental
- None.
Enhancements
-
Add configuration options to
missing_docs
rule:excludes_extensions
defaults totrue
to skip reporting violations
for extensions with missing documentation comments.excludes_inherited_types
defaults totrue
to skip reporting
violations for inherited declarations, like subclass overrides.
Ben Fox
-
Fix false negative on
redundant_optional_initialization
rule when variable
has observers.
Isaac Ressler
#3621 -
Make
test_case_accessibility
rule identify invalid test functions
with parameters.
Keith Smiley
#3612 -
Add
duplicated_key_in_dictionary_literal
rule to warn against duplicated
keys in dictionary literals.
Marcelo Fabri -
Fix the rule name from "Colon" to "Colon Spacing" to improve phrasing.
Radu
#3587 -
Add
discouraged_none_name
opt-in rule to discourage naming cases and
static/class members "none", which can conflict with Swift's
Optional<T>.none
when checking equality.
Kane Cheshire
#3624 -
Improve language and positioning of
file_length
warnings when
ignore_comment_only_lines: true
.
Steven Grosmark
#3654 -
Add
anonymous_argument_in_multiline_closure
opt-in rule to validate that
named arguments are used in closures that span multiple lines.
Marcelo Fabri
Bug Fixes
-
Fix false positives in
empty_enum_arguments
rule when comparing values
with a static member (e.g.if number == .zero
).
Marcelo Fabri
#3562 -
Fix
type_contents_order
initializer detection.
StevenMagdy -
Fix autocorrect when there's no space between the tuple the
in
keyword
onunneeded_parentheses_in_closure_argument
rule.
p-x9
#3633 -
Fix
unused_capture_list
,empty_enum_arguments
,implicit_return
and
explicit_type_interface
rules when using Swift 5.4.
Marcelo Fabri
#3615
#3685 -
Fix Xcode build logs with spaces in paths preventing
analyze
from running.
adamawolf