github realm/SwiftLint 0.47.1
0.47.1: Smarter Appliance

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

Breaking

  • None.

Experimental

  • None.

Enhancements

  • Add type-checked analyzer rule version of ArrayInitRule named
    TypesafeArrayInitRule with identifier typesafe_array_init that
    avoids the false positives present in the lint rule.
    SimplyDanny
    #3749

  • Add the --in-process-sourcekit command line flag to lint and analyze
    commands, which has the same effect as setting the IN_PROCESS_SOURCEKIT
    environment variable.
    Juozas Valancius

  • Add a new artifactbundle release asset containing swiftlint binaries for
    x86 & arm64 macOS.
    Juozas Valancius
    #3840

  • Add back return_value_from_void_function opt-in rule to warn against using
    return <expression> in a function that returns Void.
    Marcelo Fabri

  • Don't skip autocorrect on files that have parser warnings. Only files with
    errors reported by the Swift parser will be skipped.
    Marcelo Fabri
    #3343

  • Add accessibility_label_for_image rule to warn if a SwiftUI
    Image does not have an accessibility label and is not hidden from
    accessibility.
    Ryan Cole

  • Add unavailable_condition rule to prefer using if #unavailable instead of
    if #available with an empty body and an else condition when using
    Swift 5.6 or later.
    Marcelo Fabri
    #3897

  • Add comma_inheritance rule to validate that inheritance clauses use commas
    instead of &.
    Marcelo Fabri
    #3950

Bug Fixes

  • Fix false positives in unused_closure_parameter when using parameters with
    backticks.
    JP Simard
    #3628

  • Improved the syntactic_sugar rule's detection accuracy and fixed some
    corrections leading to invalid code.
    Paul Taykalo
    #3866

  • Fix analyzer rules with Xcode 13.3 / Swift 5.6. Note that we've measured
    performance regressions compared to Swift 5.5 on the order of about 2x.
    JP Simard
    #3920

  • Error by default on bad expiring todo date formatting.
    Christopher Hale
    #3636

  • Lint/analyze all files listed in the command even if the --path option is
    used.
    coffmark

Don't miss a new SwiftLint release

NewReleases is sending notifications on new releases.