SwiftLint v0.40.0 Release Notes
Release Date: 2020-08-10 // over 3 years ago-
๐ฅ Breaking
๐ SwiftLint now requires Swift 5.1 or higher to build.
JP Simard๐ Improve compile commands json file validation. If you previously provided invalid files or arguments, the command will now abort.
Keith Smiley
Experimental
- None.
โจ Enhancements
๐ JUnit reporter for GitLab artifact:report:junit with better representation of found issues.
krin-san #3177Add opt-in
ibinspectable_in_extension
rule to lint against@IBInspectable
properties inextensions
.
Keith SmileyAdd
computed_accessors_order
rule to validate the order ofget
andset
accessors in computed properties and subscripts.
Marcelo Fabri #3158Extend
empty_enum_arguments
rule to supportif case
andguard case
.
Zsolt Kovรกcs #3103Add
prefer_zero_over_explicit_init
opt-in rule to enforce using.zero
instead of calling constructor with zero arguments (e.g.CGPoint(x: 0, y: 0)
) when using CoreGraphics types.
Anton Nazarov #3190โ Add
swiftlint docs
command to easily open online documentation.
417-72KIAdd
unneeded_notification_center_removal
rule to warn against usingNotificationCenter.removeObserver(self)
indeinit
since it's not required after iOS 9/macOS 10.11.
Amzed #2755
๐ Bug Fixes
๐ Fix UnusedImportRule breaking transitive imports.
keith๐ Fix severity level configuration for
duplicate_imports
.
Yusuke GotoFixes false positives for
multiline_parameters_brackets
andmultiline_arguments_brackets
.
Noah Gilmore #3167Fix conflict of 'opening_brace' with 'implicit_return' for functions implicitly returning a closure.
SimplyDanny #3034Fix false positive on
switch_case_on_newline
rule withdo/catch
statements when using Swift 5.3.
Marcelo Fabri #3253๐ Fix false positive uppercase enum case in
raw_value_for_camel_cased_codable_enum
rule.
TeamehFix false positive in
no_space_in_method_call
rule with multiple trailing closures (Swift 5.3).
Marcelo Fabri #3259๐ Fix false negative in
explicit_acl
rule when usingextension
with Swift 5.2+.
Marcelo Fabri #3186closure_parameter_position
now triggers in closures that are not inside a function call and also validates captured variables.
Marcelo Fabri #3225๐ Fix some cases where the output would be incomplete when running SwiftLint on Linux.
Marcelo Fabri #3214compiler_protocol_init
now triggers onIndexSet(arrayLiteral:)
.
Janak Shah #3284Fix false positives in
extension_access_modifier
rule when using Swift 5.2.
Marcelo Fabri #3150