github realm/SwiftLint 0.48.0
0.48.0: Rechargeable Defuzzer

latest releases: 0.57.0, 0.56.2, 0.56.1...
2 years ago

This is the last release to support building with Swift 5.5.x and running on
macOS < 12.

Breaking

  • Deprecate the --path options for lint/analyze commands. Prefer the
    positional paths that can be added last to both commands.
    SimplyDanny

Experimental

  • None.

Enhancements

  • Support iOSApplicationExtension, macOSApplicationExtension,
    watchOSApplicationExtension, and tvOSApplicationExtension identifiers
    in the deployment_target rule. To configure the rule for these identifiers,
    you need to use the keys iOSApplicationExtension_deployment_target,
    macOSApplicationExtension_deployment_target,
    watchOSApplicationExtension_deployment_target, and
    tvOSApplicationExtension_deployment_target. Extentions default to
    their counterparts unless they are explicitly defined.
    tahabebek
    #4004

  • Rewrite operator_usage_whitespace rule using SwiftSyntax, fixing
    false positives and false negatives.
    Note that this rule doesn't catch violations around return arrows (->)
    anymore - they are already handled by return_arrow_whitespace.
    Marcelo Fabri
    #3965
    #3668
    #2728

  • Support arrays for the included and excluded options when defining
    a custom rule.
    Marcelo Fabri

  • Add back void_function_in_ternary opt-in rule to warn against using
    a ternary operator to call Void functions.
    Marcelo Fabri

  • Support UIEdgeInsets type in prefer_zero_over_explicit_init rule.
    KokiHirokawa
    #3986

Bug Fixes

  • Ignore array types in syntactic_sugar rule if their associated Index is
    accessed.
    SimplyDanny
    #3502

  • Prevent crash for private types named _ in type_name rules.
    sinoru
    #3971

  • Make for_where rule implementation independent of order in structure
    dictionary. This fixes the rule in Xcode 13.3 where some violation were
    no longer reported.
    SimplyDanny
    #3975

  • Update result builder methods in unused_declaration rule fixing some
    false-positives.
    SimplyDanny

  • Look for call expressions which are not wrapped into an argument when
    checking for nested (possibly multiline) arguments fixing some
    false-negatives in (at least) Xcode 13.2.
    SimplyDanny
    #3975

  • Make sure that include paths prefixed with the name of the original path
    are included in the analysis.
    SimplyDanny
    #3705

  • Do not trigger unavailable_condition rule if other #(un)available
    checks are involved.
    SimplyDanny
    #3985

  • Update nimble_operator to support the operators for beNil().
    CraigSiemens

  • Avoid false-positive in let_var_whitespace rule by allowing custom
    attributes on lines directly before let/var declarations.
    SimplyDanny
    #2980

Don't miss a new SwiftLint release

NewReleases is sending notifications on new releases.