SwiftLint v0.16.0 Release Notes
-
π₯ Breaking
- Several API breaking changes were made to conform to the Swift 3 API Design Guidelines. We apologize for any inconvenience this may have caused.
β¨ Enhancements
π Speed up linting by caching linter results across invocations.
Marcelo Fabri #868π Speed up linting by processing multiple files and rules concurrently.
JP Simard #1077π Make many operations in SwiftLintFramework safe to call in multithreaded scenarios, including accessing
Linter.styleViolations
.
JP Simard #1077Permit unsigned and explicitly-sized integer types in
valid_ibinspectable
Daniel Duanπ Make
nimble_operator
rule correctable.
Vojta StavikAdd
vertical_parameter_alignment
rule that checks if parameters are vertically aligned for multi-line function declarations.
Marcelo Fabri #1033β Add more helpful reason strings to TrailingCommaRule.
Matt RubinAdd
class_delegate_protocol
rule that warns against protocol declarations that aren't marked as: class
or@objc
.
Marcelo Fabri #1039Add correctable
redundant_optional_initialization
rule that warns against initializing optional variables withnil
.
Marcelo Fabri #1052redundant_nil_coalescing
rule is now correctable.
Marcelo Fabriπ Make
number_separator
rule correctable.
Marcelo Fabriempty_parentheses_with_trailing_closure
rule is now correctable.
Marcelo FabriAdd correctable
redundant_void_return
rule that warns against explicitly adding-> Void
to functions.
Marcelo Fabri #1066β Add an opt-in rule that enforces alphabetical sorting of imports.
Scott Berrevoets #900type_name
rule forces enum values to be UpperCamelCase again when used with Swift 2.3.
Marcelo Fabri #1090π Make
weak_delegate
rule ignore computed properties.
Rafael Machado #1089β Add
object_literal
opt-in rule that warns against using image and color inits that can be replaced for#imageLiteral
or#colorLiteral
in Swift 3.
Marcelo Fabri #1060π§ Now
number_separator
rule can be configured with a minimum length.
Marcelo Fabri #1109Add
compiler_protocol_init
rule that flags usage of initializers declared in protocols used by the compiler such asExpressibleByArrayLiteral
that shouldn't be called directly. Instead, you should use a literal anywhere a concrete type conforming to the protocol is expected by the context.
Marcelo Fabri #1096β Add
large_tuple
configurable rule that validates that tuples shouldn't have too many members.
Marcelo Fabri #1065Add
generic_type_name
rule that validates generic constraint type names.
Marcelo Fabri #51β‘οΈ Update
vertical_whitespace
rule to allow configuration of the number of consecutive empty lines before a violation usingmax_empty_lines
. The default value is still 1 line.
Aaron McTavish #769Add check to ignore urls in
line_length
rule whenignores_urls
configuration is enabled.
Javier HernΓ‘ndez #384β Add
shorthand_operator
rule that validates that shorthand operators should be used when possible.
Marcelo Fabri #902π Allow specifying a
swiftlint_version
configuration key which will log a warning if the current running version of SwiftLint is different than this value.
JP Simard #221β Add internal support for deprecated rule aliases.
Marcelo Fabri #973Add
unused_optional_binding
rule that will check for optional bindings not being used.
Rafael Machado #1116
π Bug Fixes
Ignore close parentheses on
vertical_parameter_alignment
rule.
Marcelo Fabri #1042π
syntactic_sugar
rule now doesn't flag declarations that can't be fixed.
Marcelo Fabri #928Fix false positives on
closure_parameter_position
andunused_closure_parameter
rules with Swift 2.3.
Marcelo Fabri #1019π Fix crash on
trailing_comma
rule with Swift 2.3.
Marcelo Fabri #921π Fix out of range exception in
AttributesRule
.
JP Simard #1105Fix
variable_name
andtype_name
rules on Linux.
Marcelo Fabriπ Fix linting directories with names ending with
.swift
.
JP Simardπ Fix running
swiftlint version
when building with Swift Package Manager.
Marcelo Fabri #1045Fix false positive on
vertical_parameter_alignment
rule when breaking line in a default parameter declaration.
Marcelo Fabri #1129