0.32.0: Wash-N-Fold-N-Reduce
This release has improved support for building and running SwiftLint using Swift 5, adds seven new (super useful) rules and fixes a number of false positives or missing violations.
Breaking
- None.
Experimental
- None.
Enhancements
-
Add
reduce_booleanrule to prefer simpler constructs overreduce(Boolean).
Xavier Lowmiller
#2675 -
Add
nsobject_prefer_isequalrule to warn against implementing==on an
NSObjectsubclass as callingisEqual(i.e. when using the class from
Objective-C) will not use the defined==method.
Matthew Healy
#2663 -
Add
reduce_intoopt-in rule to encourage the use ofreduce(into:_:)
instead ofreduce(_:_:)which is less performant.
Dalton Claybrook
#2658 -
Remove @ mark to fix invalid link in Rules.md.
Hiroki Nagasawa
#2669 -
Add new opt-in rule
file_types_orderto specify how the types in a file
should be sorted.
Cihat Gündüz
#2294 -
Add new opt-in rule
type_contents_orderto specify the order of subtypes,
properties, methods & more within a type.
Cihat Gündüz
#2294 -
Add
nslocalizedstring_require_bundlerule to ensure calls to
NSLocalizedStringspecify the bundle where the strings file is located.
Matthew Healy
#2595 -
contains_over_first_not_nilrule now also checks forfirstIndex(where:).
Marcelo Fabri
#2678 -
Add
unused_capture_listrule to ensure that all references in a closure
capture list are used.
Dalton Claybrook
#2715 -
SwiftLint can now be compiled using Xcode 10.2.
Marcelo Fabri
Norio Nomura
#2693
Bug Fixes
-
Fix bug where SwiftLint ignores excluded files list in a nested configuration
file.
Dylan Bruschi
#2447 -
colonrule now catches violations when declaring generic types with
inheritance or protocol conformance.
Marcelo Fabri
#2628 -
discarded_notification_center_observerrule now checks if the observer is
added to any collection or passed to a function before triggering the
violation.
jsloop42
#2684 -
Fix false positives on
number_separatorwhen the number is wrapped in
parentheses.
Dalton Claybrook
#2683 -
Fix false positives on
sorted_first_lastwhen callingfirstIndexand
lastIndexmethod.
Taiki Komaba
#2700 -
Fix crash when running on Linux with Swift 5 without specifying a
--path
value or specifying an empty string.
Keith Smiley
#2703 -
Fix false positives on
explicit_aclandexplicit_top_level_aclrules when
declaring extensions that add protocol conformances with Swift 5.
Marcelo Fabri
#2705 -
Let
disable allcommand overridesuperfluous_disable_commandrule.
Frederick Pietschmann
#2670 -
Fix issues in
explict_acl,redundant_set_access_controland
explicit_top_level_aclrules when using Swift 5.
Marcelo Fabri
#2694