Skip to content

Update dependency realm/SwiftLint to v0.64.1#58

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/realm-swiftlint-0.x
Open

Update dependency realm/SwiftLint to v0.64.1#58
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/realm-swiftlint-0.x

Conversation

@renovate

@renovate renovate Bot commented Mar 12, 2024

Copy link
Copy Markdown

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Update Change
realm/SwiftLint minor 0.43.10.64.1

Release Notes

realm/SwiftLint (realm/SwiftLint)

v0.64.1

Compare Source

v0.64.0

Compare Source

Breaking
  • The ignored_literal_argument_functions option of the force_unwrapping rule now
    uses the configured value as-is instead of always merging in the five built-in defaults
    (URL(string:), NSURL(string:), UIImage(named:), NSImage(named:), Data(hexString:)).
    Those five functions remain the default when the option is not configured, but setting
    ignored_literal_argument_functions to any explicit list — including [] — now fully
    replaces the defaults. Configurations that add functions on top of the defaults must now
    explicitly include the five previously-default functions in their list.
    SimplyDanny
    #​6675
Experimental
  • None.
Enhancements
  • SwiftLint can now be built and run on Windows. It is expected to work in the same way as
    on other platforms. The only restrictions are missing support for ?[] glob patterns in
    include/exclude patterns and the requirement for \n as line ending in all linted files.
    compnerd
    roman-bcny
    SimplyDanny
    #​6351
    #​6352

  • Rename allow_implicit_init to include_implicit_init for the
    optional_data_string_conversion rule to convey its purpose more clearly.
    SimplyDanny
    #​6670

  • Improve linting performance by 10-15%, especially when running with many
    threads, by optimizing cache locking and reducing contention. Depending on
    the project and level of concurrency, the performance improvement can be even
    higher (3-4x).
    SimplyDanny

  • Rewrite the following rules with SwiftSyntax:

    • file_types_order

    SimplyDanny

  • Fix false positive in accessibility_label_for_image rule for images inside
    SwiftUI Label's icon: closure, which are inherently labeled by the
    Label's text content.
    sutheesh
    #​6420

Bug Fixes
  • Fix literal_expression_end_indentation autocorrection deleting source code
    when the closing bracket of a multiline literal shares a line with the end of
    a multiline last element (e.g. ...))]). The corrector assumed everything
    before the bracket on that line was indentation and replaced it; it now moves
    only the bracket to its own line at the expected indentation.
    Luan Câmara
    #​2823

  • Don't rewrite the type operand of an is / as? / as! cast (such as
    x is A) to Self in prefer_self_in_static_references when inside a
    class-like scope. Self is the dynamic type, so the rewrite silently changed
    runtime behavior for non-final classes (x is Self is not equivalent to
    x is A). Mirrors the rule's existing X.self skip; static member references
    such as A.f() are still corrected.
    Brett-Best
    #​6764

  • Avoid false positives in vertical_parameter_alignment when a parameter is
    preceded by multi-byte characters, such as a function name containing
    non-ASCII letters. Alignment is now compared by visible column rather than by
    UTF-8 byte offset.
    systemBlue
    #​5037

  • Treat macro declarations like function declarations for line_length when
    ignores_function_declarations is enabled.
    leno23
    #​5648

  • Make Glob.expandGlobstar tolerant of unreadable directory entries on
    large trees. subpathsOfDirectory(atPath:) aborted the entire glob
    expansion on the first unreadable entry (permission denied, dangling
    symlink, file removed mid-scan), causing most files in large projects to
    be silently ignored. Replace the directory walk with a lazy URL
    enumerator that has a per-item error handler so unreadable items are
    skipped individually.
    Chupik

  • Avoid false positives in prefer_self_in_static_references for generic
    constraints and generic parameter bounds such as where A: P and <A: P>
    in classes and extensions.
    SimplyDanny
    #​6674

  • Don't rewrite a type reference to Self in prefer_self_in_static_references
    when it appears in a protocol composition (such as any A & B), as the
    constraint of an existential or opaque type (such as any A or some A), or
    as the base of an existential metatype (such as A.Protocol), since the named
    type is not interchangeable with Self in those positions.
    Brett-Best
    #​6748

v0.63.3

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Treat extensions like classes in the prefer_self_in_static_references
    rule.
    itsybitsybootsy
    #​3993

  • Print fixed code read from stdin to stdout.
    SimplyDanny
    #​6501

  • Add new redundant_final rule that detects final modifiers on declarations
    where they are redundant due to the containing context, such as final classes
    or actors. Final actors are themselves implicitly final, so the final modifier
    is redundant on them as well.
    william-laverty
    SimplyDanny
    #​6407

  • Add discouraged_default_parameter opt-in rule that flags default parameter
    values in functions with configurable access levels.
    William-Laverty
    #​6488

  • Add ignored_literal_argument_functions option to the force_unwrapping rule
    to skip violations for configurable function calls when all arguments are
    literal values (e.g. URL(string: "https://example.com")!). Defaults
    include URL(string:), NSURL(string:), UIImage(named:),
    NSImage(named:), and Data(hexString:).
    claudeaceae
    #​6487

  • Add rules array to SARIF reporter output, providing metadata for all
    built-in rules in accordance with the SARIF specification.
    ahmadalfy
    #​6499

  • Add allow_underscore_prefixed_names option to unused_parameter so
    underscore-prefixed parameter names can be treated as intentionally
    unused when configured.
    theamodhshetty
    #​5741

  • Add detection of cases such as String.init(decoding: data, as: UTF8.self) and
    let text: String = .init(decoding: data, as: UTF8.self) to
    optional_data_string_conversion rule.
    nadeemnali
    #​6359

  • Add new default invisible_character rule that detects invisible characters
    like zero-width space (U+200B), zero-width non-joiner (U+200C),
    and FEFF formatting character (U+FEFF) in string literals, which can cause
    hard-to-debug issues.
    kapitoshka438
    #​6045

  • Add variable_shadowing rule that flags when a variable declaration shadows
    an identifier from an outer scope.
    nadeemnali
    #​6228

  • Add legacy_uigraphics_function rule to encourage the use of modern
    UIGraphicsImageRenderer instead of the legacy UIGraphics{Begin|End}ImageContext.
    The modern replacement is safer, cleaner, Retina-aware and more performant.
    Dimitri Dupuis-Latour
    #​6268

  • Support access level modifiers on imports in unused_imports rule.
    SimplyDanny
    #​6620

  • Add name="SwiftLint" to JUnit testsuites and testsuite output for
    better CI parser compatibility.
    theamodhshetty
    #​6161

  • Improve the opt-in pattern_matching_keywords rule by extending support
    beyond switch case and refining nested pattern handling.
    GandaLF2006

Bug Fixes
  • Recognize isolated as an isolation modifier in modifier_order, so it can
    be ordered via the isolation entry in preferred_modifier_order.
    leno23
    #​6164

  • Detect and autocorrect missing whitespace before else in guard
    statements for the statement_position rule.
    theamodhshetty
    #​6153

  • Avoid false positives from unused_enumerated when higher-order calls on
    .enumerated() use result members like ?.offset after the closure.
    theamodhshetty
    #​5881

  • Add an ignore_attributes option to implicit_optional_initialization so
    wrappers/attributes that require explicit = nil can be excluded from
    style checks for both style: always and style: never.
    theamodhshetty
    #​3998

  • Skip @TestState properties in quick_discouraged_call rule, matching
    existing @TestInjected and @TestWeakly exclusions.
    William-Laverty
    #​5803

  • Fix explicit_self false positives around string interpolation.
    jffmrk
    SimplyDanny
    #​6611

  • Properly taint variables in tuples for unneeded_escaping rule.
    SimplyDanny
    #​6621

  • Ensure that disable commands work for redundant_nil_coalescing rule.
    SimplyDanny
    #​6465

  • Take try expressions in call parameters into account even if the call has
    trailing closures as well, so that an outer throws is not considered unneeded
    in the unneeded_throws_rethrows rule.
    SimplyDanny
    #​6491

  • Ensure that disable commands work for prefer_key_path rule when the trailing
    closure starts on a different line than the function call as a whole.
    SimplyDanny
    #​6466

  • Track identifiers declared in tuples to avoid false positives in the
    redundant_self rule.
    SimplyDanny
    #​6553

  • Respect existing environment variables when setting BUILD_WORKSPACE_DIRECTORY
    in build tool plugins.
    SimplyDanny
    #​6080

  • Fix false positives in indentation_width rule for continuation lines
    of multi-line guard/if/while conditions. A new option
    include_multiline_conditions (default: false) skips these lines by
    default. When enabled, it validates that continuation lines are aligned
    with the first condition after the keyword.
    tanaev
    #​4961

  • multiline_call_arguments no longer reports violations for enum-case patterns in
    pattern matching (e.g. if case, switch case, for case, catch).
    GandaLF2006

  • Avoid false positives in prefer_self_in_static_references when a nested type
    shadows its enclosing type name.
    theamodhshetty
    #​5917

v0.63.2

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Add ignore_regex configuration option to the large_tuple rule to silence
    violations for tuples inside Regex<...> types, which commonly have large
    tuple type parameters for capture groups.
    Deco354
    #​6340
Bug Fixes
  • Use start position of closure (in addition to the containing function call) to check
    if violations are disabled for it in trailing_closure rule.
    SimplyDanny
    #​6451

v0.63.1

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Add a --disable-sourcekit flag to the lint command to disable SourceKit when needed.
    The environment variable SWIFTLINT_DISABLE_SOURCEKIT can still be used as well.
    SimplyDanny
    #​6282
Bug Fixes
  • Retain async initializers in actors in async_without_await rule.
    SimplyDanny
    #​6423

  • Inform users about files being skipped due to impossible file system representation
    instead of crashing.
    SimplyDanny
    #​6419

  • Ignore override functions in async_without_await rule.
    SimplyDanny
    #​6416

  • Avoid infinite recursion for deeply nested symbolic links which is usually the case
    in node_modules directories managed by pnpm.
    SimplyDanny
    #​6425

  • Fix false positive in unneeded_escaping rule when an escaping closure is used in
    a nested closure preceded by another closure.
    SimplyDanny
    #​6410

  • Fix non-excluded bool literal in optional_enum_case_name when used inside a tuple.
    tristan-burnside-anz

v0.63.0

Compare Source

Breaking
  • The redundant_self_in_closure rule has been renamed to redundant_self (with
    redundant_self_in_closure as a deprecated alias) to reflect its now broader scope,
    while by default still maintains the previous behavior of only checking closures.
    To enable checking for all redundant self usages, set the new only_in_closures
    option to false.
    SimplyDanny
Experimental
  • None.
Enhancements
  • Extend redundant_self_in_closure rule to detect all redundant uses of self,
    not just in closures. Initializers (which commonly prefer an explicit self prefix)
    can be ignored by setting keep_in_initializers to true.
    SimplyDanny

  • Add a separation configuration option to the vertical_whitespace_between_cases rule
    to allow customizing blank line separation between switch cases. The default value is
    always (require at least one blank line). Setting it to never enforces no blank
    lines between cases.
    SimplyDanny
    #​6326

  • Rewrite the following rules with SwiftSyntax:

    • vertical_whitespace_between_cases

    SimplyDanny

  • Add new opt-in unneeded_throws_rethrows rule that triggers when declarations
    marked throws/rethrows never actually throw or call any throwing code.
    Tony Ngo

  • Add new unneeded_escaping rule that detects closure parameters marked with
    @escaping that are never stored or captured escapingly.
    SimplyDanny

  • Add multiline_call_arguments opt-in rule to enforce consistent multiline
    formatting for function and method call arguments.
    GandaLF2006

  • Improve performance when exclude patterns resolve to a large set of files.
    SimplyDanny
    #​5018
    #​5207
    #​5953
    #​6084
    #​6259

Bug Fixes
  • Fix line_length rule incorrectly ignoring function bodies when
    ignores_function_declarations is enabled. The option should only ignore
    function declarations, not their implementation.
    SimplyDanny
    #​6347

  • Fix false positives in vertical_whitespace_between_cases rule when cases are
    interleaved with compiler directives like #if/#else/#endif.
    SimplyDanny
    #​6332

  • override_in_extension no longer triggers inside @objc @&#8203;implementation extensions.
    JaredGrubb

  • Reinstate handling of access level imports in sorted_imports rule.
    Brett-Best
    #​6374

v0.62.2

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Add new incompatible_concurrency_annotation rule that triggers when a declaration
    isolated to a global actor, @Sendable closure arguments and/or generic sendable
    constraints is not annotated with @preconcurrency in order to maintain compatibility
    with Swift 5.
    mattmassicotte
    SimplyDanny
    #​5987

  • Add isolation modifier group to modifier_order rule configuration.
    This allows configuring the position of nonisolated modifiers.
    nandhinisubbu
    #​6164

  • Add test count to JUnit reporter.
    nandhinisubbu
    #​6161

  • Adopt mimalloc for static Linux binary
    to improve performance.
    ainame
    #​6298

Bug Fixes
  • Fix false positive with #Preview macro in closure_end_indentation rule.
    gibachan

  • Fix correction of sorted_imports rule when comments (with a distance) are present before
    the first import.
    SimplyDanny
    #​6317

v0.62.1

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • None.
Bug Fixes
  • Remove trailing comma making the code base again compilable with at least Swift 6.0.
    SimplyDanny

v0.62.0

Compare Source

Breaking
  • The structure of SwiftLintBinary.artifactbundle.zip is now simpler. Internal paths no
    longer contain version numbers, especially. So in an Xcode Run Script build phase,
    you can refer to the swiftlint binary like this:

    SWIFT_PACKAGE_DIR="${BUILD_DIR%Build/*}SourcePackages/artifacts"
    SWIFTLINT_CMD="$SWIFT_PACKAGE_DIR/swiftlintplugins/SwiftLintBinary/SwiftLintBinary.artifactbundle/macos/swiftlint"

    All other consumers of the artifact bundle do not need to change anything. Swift Package
    Manager resolves the new paths automatically.
    SimplyDanny

  • SwiftLint now requires a Swift 6 or higher compiler to build. The
    Swift Package Manager plugins continue
    to work with all versions down to Swift 5.9.
    SimplyDanny

  • sorted_imports rule's behavior changed in that it now treats imports directly adjacent
    to each other as a group that is sorted together. Imports separated by at least one
    non-import statement or empty line(s) are treated as separate groups. Comments are
    considered part of the import group they are attached to and do not break it.
    SimplyDanny

Experimental
  • None.
Enhancements
  • Rewrite the following rules with SwiftSyntax:

    • modifier_order
    • sorted_imports

    SimplyDanny

  • Add new prefer_asset_symbols rule that suggests using asset symbols over
    string-based image initialization to avoid typos and enable compile-time
    checking. This rule detects UIImage(named:) and SwiftUI.Image(_:) calls
    with string literals and suggests using asset symbols instead.
    danglingP0inter
    #​5939

  • Exclude integer generic parameters from generic_type_name rule.
    Include integer generic parameters in the identifier_name rule for validation.
    nandhinisubbu
    #​6213

  • Add new option ignores_regex_literals to line_length rule.
    It allows to ignore regex literals.
    nandhinisubbu
    #​6304

  • Add ignores_literals configuration for trailing_whitespace rule.
    It allows to ignore trailing whitespace in multiline strings.
    nandhinisubbu
    #​6194

Bug Fixes
  • Ignore function, initializer and subscript declarations alike when the
    ignores_function_declarations option is enabled in the line_length rule.
    SimplyDanny
    #​6241

  • Individual custom_rules can now be specified in the only_rule configuration
    setting and the --only-rule command line option without having to specify
    custom_rules as well. Additionally, violations of custom rules are now reported
    in a deterministic order, sorted by the rule's identifier.
    Martin Redington
    #​6029
    #​6058

  • Ignore redundant_discardable_let rule violations in nested SwiftUI scopes as well
    when ignore_swiftui_view_bodies is enabled.
    SimplyDanny
    #​3855
    #​6255

  • Exclude function types from async_without_await rule analysis. Higher-order function
    objects can be async without containing an await when assigning to them.
    SimplyDanny
    #​6253

  • Exclude @concurrent functions from async_without_await rule analysis.
    @concurrent functions requires aysnc in any case.
    nandhinisubbu
    #​6283

  • swiftlint-static, the experimental fully-static Linux binary, now uses 512 KiB
    as thread stack size matching Darwin’s size to prevent stack exhaustion.
    ainame
    #​6287

v0.61.0

Compare Source

Breaking
  • If SWIFTLINT_DISABLE_SOURCEKIT is set to prohibit loading libsourcekitdInProc at runtime,
    rules requiring SourceKit will be disabled and a warning will be printed once per rule.
    SimplyDanny

  • The operator_whitespace rule has been removed and its functionality merged into the
    function_name_whitespace rule. The latter now also checks spacing around the func
    keyword, the function name/operator and its generic parameters while respecting comments.
    On top of that, it supports autocorrection.
    SimplyDanny

  • Expose only TestHelpers and ExtraRulesTests as part of Bazel releases.
    SimplyDanny

Experimental
  • Both Linux release archives (for AMD64 and ARM64) now contain two binaries:
    • A dynamically linked binary that requires libsourcekitdInProc.so together with its
      transitive dependencies to be present on the system at runtime. It is named swiftlint
      and the same binary as before. It supports all built-in rules.
    • A fully statically linked binary named swiftlint-static that does not require
      any dynamic libraries at runtime. Rules requiring SourceKit will be disabled and
      reported to the console when running this binary.
    SimplyDanny
Enhancements
  • A fully statically linked Linux binary can now be built with the Swift SDK and
    the compiler options -Xswiftc -DSWIFTLINT_DISABLE_SOURCEKIT. This binary does not
    require libsourcekitdInProc.so or any other dynamic libraries to be present on the
    system at runtime. Rules requiring SourceKit will be disabled and reported to the console
    when running this binary.
    SimplyDanny

  • Add function_name_whitespace rule to enforce consistent spacing between the func
    keyword, function name, and its generic parameters. Ensures exactly one space between
    func and the function name, and configurable spacing around generics via
    generic_spacing:

    • no_space (default): func name<T>()
    • leading_space: func name <T>()
    • trailing_space: func name<T> ()
    • leading_trailing_space: func name <T> ()
      Supports autocorrection.
      GandaLF2006
  • The operator_whitespace rule now supports autocorrection and better respects comments in
    function declarations. The rule has been deprecated in favor of the new function_name_whitespace
    rule. You can still refer to it by its identifier, but get checking for normal function names
    on top.
    SimplyDanny

  • In line_length rule, treat strings with opening and closing quotes in the same line as
    single-line strings no matter if they are enclosed by triple quotes or not. Furthermore,
    improve detection of comment-only lines.
    SimplyDanny
    #​6220
    #​6219

  • Improve detection of comment-only lines in file_length rule.
    SimplyDanny
    #​6219

  • Rewrite quick_discouraged_call rule with SwiftSyntax.
    SimplyDanny

Bug Fixes
  • Ensure that header matched against always end in a newline in file_header rule.
    SimplyDanny
    #​6227

  • Fix closure_end_indentation rule reporting violations when the called base
    involves chained optional expressions.
    SimplyDanny
    #​6216

v0.60.0

Compare Source

Breaking
  • Remove support for boolean values in the validates_start_with_lowercase option entirely.
    Use the severity levels off, warning or error instead.
    kaseken

  • SwiftLint now requires macOS 13 or higher to run.
    JP Simard

  • In SwiftLintBuildToolPlugin, print the content of the BUILD_WORKSPACE_DIRECTORY
    environment variable only in debug builds.
    SimplyDanny
    #​6135

  • The redundant_optional_initialization rule has been replaced by the
    implicit_optional_initialization rule that enforces implicit or explicit initialization
    of optional variables. Its default style always mimics the behavior of the
    redundant_optional_initialization rule by default. redundant_optional_initialization
    is now an alias for implicit_optional_initialization.
    leo-lem
    #​1940

  • The swiftlint_linux.zip release archive has been renamed to swiftlint_linux_amd64.zip
    to avoid confusion with the new swiftlint_linux_arm64.zip archive.
    Bradley Mackey
    SimplyDanny

Experimental
  • None.
Enhancements
  • Linting got up to 30% faster due to the praiseworthy performance
    improvements done in the SwiftSyntax
    library.

  • Ignore locally defined count identifiers in empty_count rule.
    SimplyDanny
    #​5326

  • The private_swiftui_state rule now applies to ViewModifier types.
    mt00chikin

  • Support for ARM64 Linux binaries has been added. The swiftlint_linux.zip release archive
    has been renamed to swiftlint_linux_amd64.zip. Next to it, a new swiftlint_linux_arm64.zip
    archive has been added. The SwiftLintBinary.artifactbundle.zip now contains both versions
    of the Linux binary, so that the binary plugins
    can now be used on Linux and macOS running no both AMD64 and ARM64 architectures.
    Bradley Mackey
    SimplyDanny

  • Add include_variables configuration option to non_optional_string_data_conversion rule.
    When enabled, the rule will trigger on variables, properties, and function calls in addition
    to string literals. Defaults to false for backward compatibility.
    SimplyDanny
    #​6094

  • Add Sendable conformance to Rule.Type for building with Swift 6.
    erikkerber
    #issue_number

  • Fix false positives for Actor-conforming delegate protocols in the
    class_delegate_protocol rule.
    imsonalbajaj
    #​6054

  • Support extensions and protocols in type_body_length rule. They can be configured using the
    new excluded_types option which by default excludes extension and protocol types.
    This means the rule now checks struct, class, actor and enum by default. To enable
    checking of extensions and protocols, set excluded_types to an empty array or exclude other
    types as needed.
    SimplyDanny

  • Exclude explicit system modules from duplicate_imports analysis, that is, modules
    that are part of the system frameworks but need to be imported explicitly due to being
    declared as explicit module in their module map.
    SimplyDanny
    #​6098

  • Ignore various assignment operators like =, +=, &=, etc. with right-hand side
    ternary expressions otherwise violating the void_function_in_ternary rule.
    SimplyDanny
    #​5611

  • Rewrite the following rules with SwiftSyntax:

    • accessibility_label_for_image
    • accessibility_trait_for_button
    • closure_end_indentation
    • expiring_todo
    • file_header
    • file_length
    • line_length
    • trailing_whitespace
    • vertical_whitespace

    JP Simard
    Matt Pennig

  • Add excluded_paths option to the file_name rule. It allows to exclude complete file
    paths from analysis. All entries are treated as regular expressions. A single match in
    its full path is enough to ignore a file. This is different from the excluded option
    that only accepts and checks against file names.
    Ueeek
    #​6066

  • Fix false positives of redundant_discardable_let rule in @ViewBuilder functions,
    #Preview macro bodies and preview providers when ignore_swiftui_view_bodies is
    enabled.
    kaseken
    #​6063

  • Improve multiline_parameters rule to correctly support
    max_number_of_single_line_parameters and detect mixed formatting.
    GandaLF2006

  • Add new prefer_condition_list rule that triggers when a guard/if/while
    condition is composed of multiple expressions connected by the && operator.
    It suggests to use a condition list instead, which is more idiomatic.
    SimplyDanny

  • Add ignore_coding_keys parameter to nesting rule. Setting this to true prevents
    CodingKey enums from violating the rule.
    braker1nine
    #​5641

  • Support deinitializers and subscripts in function_body_length rule.
    SimplyDanny

  • Extend the xct_specific_matcher rule to support identity operators (=== and !==)
    in addition to the existing equality operators (== and !=).
    SimplyDanny
    #​5849

  • Add new implicit_optional_initialization rule to enforce implicit or explicit
    initialization of optional variables, configurable via style: always | never.
    It replaces the redundant_optional_initialization rule mimicking it with the
    style: always option which is the default.
    leo-lem
    #​1940

  • Add new ignore_identity_closures parameter to prefer_key_paths rule to skip
    conversion of identity closures ({ $0 }) to identity key paths (\.self).
    Note that identity key paths are only supported from Swift 6 on, hence this option
    will be implicitly ignored/set to true when SwiftLint detects a Swift <6 compiler
    to avoid causing compilation errors.
    p4checo
    #​5965

Bug Fixes
  • Fix no_extension_access_modifier rule incorrectly triggering for nonisolated extension.
    The rule now only flags actual access control modifiers (private, public, open,
    internal, fileprivate) and ignores isolation modifiers like nonisolated.
    copilot
    #​6168

  • Improved error reporting when SwiftLint exits, because of an invalid configuration file
    or other error.
    Martin Redington
    #​6052

  • Keep the default severity levels when neither warning nor error values are configured.
    Ensure especially that the error level is not set to nil when the warning level
    isn't set either.
    SimplyDanny

v0.59.1

Compare Source

Breaking
  • Remove opaque_over_existential opt-in rule as it causes too many false positives
    that can even lead to wrong-compilable code when any is required by a protocol the
    type conforms to. In this case, using some can be totally valid even though the
    protocol requirement is not reimplemented for the type causing behavioral changes.
    SimplyDanny
Experimental
  • None.
Enhancements
Bug Fixes
  • None.

v0.59.0

Compare Source

Breaking
  • Remove tracking of correction positions. Print the number of corrections applied instead.
    SimplyDanny
Experimental
  • Introduce swiftlint-dev command line tool that's intended to help to develop SwiftLint by encapsulating repetitive
    tasks. It can already be used to generate templates for new rules including optional configurations and tests. Run
    swift run swiftlint-dev rules template -h to get an overview of the command's usage and the available customization
    options. To register new rules, run swift run swiftlint-dev rules register.
    SimplyDanny
Enhancements
  • Add new option ignores_multiline_strings to line_length rule. It allows to ignore too long
    lines inside of multiline strings.
    thisIsTheFoxe
    #​2689

  • Ignore UIColor initializers in no_magic_numbers rule.
    suojae
    hyeffie
    #​5183

  • Exclude types with a @Suite attribute and functions annotated with @Test from no_magic_numbers rule.
    Also treat a type as a @Suite if it contains @Test functions.
    SimplyDanny
    #​5964

  • Add new opaque_over_existential opt-in rule that triggers when the existential any type of a
    function parameter can be replaced with an opaque some type.
    SimplyDanny

  • Add a new rationale property to rule descriptions, providing a more expansive
    description of the motivation behind each rule.
    Martin Redington
    #​5681

  • Add new allowed_types option to legacy_objc_type rule to ignore certain types.
    kapitoshka438
    #​3723

  • Add excluded_methods configuration option to unneeded_override to opt out checking methods with a given name.
    For example, this helps avoid a conflict with balanced_xctest_lifecycle where one of setUp/tearDown
    is empty but the other is not.
    jaredgrubb

Bug Fixes
  • Fix issue referencing the Tests package from another Bazel workspace.
    jszumski

  • Fix crash when a disable command is preceded by a unicode character.
    SimplyDanny
    #​5945

  • Allow severity of duplicate_imports rule to be configurable.
    SimplyDanny
    #​5978

  • Silence no_magic_numbers rule in conditions of #if directives.
    SimplyDanny
    #​6000

  • Consider types restricting a protocol to classes in composed inherited types in class_delegate_protocol rule.
    SimplyDanny
    #​5982

  • Rewrite type_contents_order rule with SwiftSyntax fixing an issue with experimental availability macros.
    SimplyDanny
    #​5999

  • Update file_name rule to consider macro types.
    fraioli
    #​6026

v0.58.2

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • None.
Bug Fixes
  • Fix version being reported by the binary consumed from the Docker image.
    SimplyDanny
    #​5966

v0.58.1

Compare Source

Breaking
  • If you are referring to the swiftlint binary from an Artifact Bundle consumed via Swift Package Manager
    in an Xcode Run Script Build Phase, make sure to update the path from

    "$SWIFT_PACKAGE_DIR"/swiftlintplugins/SwiftLintBinary/SwiftLintBinary.artifactbundle/swiftlint-*/bin/swiftlint

    to

    "$SWIFT_PACKAGE_DIR"/swiftlintplugins/SwiftLintBinary/SwiftLintBinary.artifactbundle/swiftlint-*-macos/bin/swiftlint

    in order to make Xcode use the binary built for macOS.
    SimplyDanny
    #​5954

  • Revert changes to improve performance when exclude patterns resolve to a large set of files. While resolving files
    indeed got much faster in certain setups, it leads to missed exclusions for nested configurations and when the linted
    folder is not the current folder.
    SimplyDanny
    #​5953

Experimental
  • None.
Enhancements
  • None.
Bug Fixes
  • Fix redundant_sendable correction by removing a remaining trailing comma as well when Sendable was last.
    SimplyDanny
    #​5952

  • Remove lints for redundant_sendable on protocols, where Sendable is not redundant.
    riley-williams
    #​5958

  • Add ib_segue_action to default configuration of type_contents_order rule on the same level as ib_action to
    define and document a standard position.
    SimplyDanny
    #​5524

v0.58.0

Compare Source

Breaking
  • The command plugin now requires write permissions so that it works with the --fix option without an error.
    SimplyDanny

  • The artifact bundle name has changed. SwiftLintBinary-macos.artifactbundle.zip is now called
    SwiftLintBinary.artifactbundle.zip. It now includes an AMD64 Linux binary.
    Bradley Mackey
    #​5514

  • The inert_defer and unused_capture_list rules have completely been removed after being deprecated for 2 years.
    SimplyDanny

  • SwiftLint now requires a Swift 5.10 or higher compiler to build.
    The Swift Package Manager plugins continue to work with
    Swift 5.9.
    SimplyDanny

  • The private_unit_test rule's deprecated regex configuration option has been removed after 2 years.
    Martin Redington
    #​5912

Experimental
  • None.
Enhancements
  • Add Xcode command plugin allowing to run SwiftLint from within Xcode.
    SimplyDanny

  • Add new async_without_await opt-in rule that checks if an async declaration contains at least one await.
    Jan Kolarik
    #​5082

  • Support replacing identity expressions with \.self in prefer_key_path rule from Swift 6 on.
    SimplyDanny

  • Support linting only provided file paths with command plugins.
    DanSkeel

  • Add new category for @IBSegueAction to type_contents_order rule.
    dk-talks
    SimplyDanny

  • Add option to disable redundant_discardable_let rule in SwiftUI view bodies.
    SimplyDanny
    #​3855

  • Add new redundant_sendable rule that triggers on Sendable conformances of
    types that are implicitly already Sendable due to being actor-isolated. It
    is enabled by default.
    SimplyDanny

  • Improve performance when exclude patterns resolve to a large set of files.
    SimplyDanny
    #​5018

Bug Fixes
  • Ignore TipKit's #Rule macro in empty_count rule.
    Ueeek
    #​5883

  • Ignore super calls with trailing closures in unneeded_override rule.
    SimplyDanny
    #​5886

  • If violations are detected by lint or analyze, still perform an update
    check for new versions of SwiftLint if requested.
    Martin Redington
    #​5904

v0.57.1

Compare Source

Breaking
  • None.
Experimental
  • None.
Enhancements
  • Suggest failable String(bytes:encoding:) initializer in
    optional_data_string_conversion rule as it accepts all Sequence
    types.
    Jordan Rose
    SimplyDanny

  • Support reading files to lint from Input File Lists provided
    by Run Script Build Phases in Xcode using the command-line
    argument --use-script-input-file-lists.
    BlueVirusX

  • Adds a lenient configuration file setting, equivalent to the --lenient
    command line option.
    Martin Redington
    #​5801

  • Support type casting on configuration option values defined by environment variables.
    Without a cast, these values would always be treated as strings leading to a potentially
    invalid configuration.
    SimplyDanny
    #​5774

  • Add new option max_number_of_single_line_parameters that allows only the specified maximum
    number of parameters to be on one line when allows_single_line = true. If the limit is
    exceeded, the rule will still trigger. Confusing option combinations like allows_single_line = false
    together with max_number_of_single_line_parameters > 1 will be reported.
    kimdv
    SimplyDanny
    #​5781

  • The redundant_type_annotation rule gains a new option,
    ignore_properties, that skips enforcement on members in a
    type declaration (like a struct). This helps the rule coexist with
    the explicit_type_interface rule that requires such redundancy.
    jaredgrubb
    #​3750

  • Allow inherited isolation parameter to be first in function signatures
    depending on the new option ignore_first_isolation_inheritance_parameter
    which is true by default.
    SimplyDanny
    #​5793

Bug Fixes
  • Run command plugin in whole package if no targets are defined in the
    package manifest.
    SimplyDanny
    #​5787

  • Silence superfluous_else rule on if expressions with only a single
    availability condition.
    SimplyDanny
    #​5833

  • Stop triggering the control_statement rule on closures being directly
    called as conditions.
    SimplyDanny
    #​5846

  • Do not trigger self_in_property_initialization rule on self in
    key paths expressions.
    SimplyDanny
    #​5835

  • Allow to specify transitive modules to be taken into account by
    unused_import rule. This avoids that required imports are removed.
    Paul Taykalo
    SimplyDanny
    #​5167

  • Only pass cache path and directory paths to commands that accept these arguments
    in the command plugin.
    SimplyDanny
    #​5848

  • Do not throw deprecation warning if deprecated property is not
    presented in configuration.
    chipp
    [#​5791]

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 3d3c546 to 841b3b6 Compare May 11, 2024 22:55
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.54.0 Update dependency realm/SwiftLint to v0.55.0 May 11, 2024
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 841b3b6 to c1f8e2c Compare May 16, 2024 22:46
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.55.0 Update dependency realm/SwiftLint to v0.55.1 May 16, 2024
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from c1f8e2c to 725ed1f Compare August 6, 2024 20:37
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.55.1 Update dependency realm/SwiftLint to v0.56.0 Aug 6, 2024
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 725ed1f to 15a3402 Compare August 7, 2024 01:22
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.56.0 Update dependency realm/SwiftLint to v0.56.1 Aug 7, 2024
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 15a3402 to d568f18 Compare August 22, 2024 12:33
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.56.1 Update dependency realm/SwiftLint to v0.56.2 Aug 22, 2024
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from d568f18 to a79f813 Compare September 8, 2024 19:19
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.56.2 Update dependency realm/SwiftLint to v0.57.0 Sep 8, 2024
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from a79f813 to bb0b84e Compare November 24, 2024 15:31
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.57.0 Update dependency realm/SwiftLint to v0.57.1 Nov 24, 2024
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from bb0b84e to a3197c1 Compare January 12, 2025 16:49
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.57.1 Update dependency realm/SwiftLint to v0.58.0 Jan 12, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from a3197c1 to 42f667a Compare January 15, 2025 21:38
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.58.0 Update dependency realm/SwiftLint to v0.58.1 Jan 15, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 42f667a to 47094af Compare January 17, 2025 01:50
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.58.1 Update dependency realm/SwiftLint to v0.58.2 Jan 17, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 47094af to d3cc76d Compare April 5, 2025 14:36
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.58.2 Update dependency realm/SwiftLint to v0.59.0 Apr 5, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from d3cc76d to 30cb289 Compare April 15, 2025 17:07
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.59.0 Update dependency realm/SwiftLint to v0.59.1 Apr 15, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 30cb289 to 3d202b6 Compare August 20, 2025 17:53
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.59.1 Update dependency realm/SwiftLint to v0.60.0 Aug 20, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 3d202b6 to 274dfd5 Compare August 20, 2025 23:35
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.60.0 Update dependency realm/SwiftLint to v0.59.1 Aug 20, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 274dfd5 to 631b895 Compare August 31, 2025 10:46
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.59.1 Update dependency realm/SwiftLint to v0.60.0 Aug 31, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 631b895 to b8b7d9b Compare September 6, 2025 17:23
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.60.0 Update dependency realm/SwiftLint to v0.61.0 Sep 6, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from b8b7d9b to b0d4c74 Compare October 13, 2025 21:34
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.61.0 Update dependency realm/SwiftLint to v0.62.0 Oct 13, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from b0d4c74 to e769100 Compare October 14, 2025 02:42
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.62.0 Update dependency realm/SwiftLint to v0.62.1 Oct 14, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from e769100 to c7532d3 Compare October 28, 2025 21:47
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.62.1 Update dependency realm/SwiftLint to v0.62.2 Oct 28, 2025
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from c7532d3 to c38caa5 Compare January 3, 2026 17:27
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.62.2 Update dependency realm/SwiftLint to v0.63.0 Jan 3, 2026
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from c38caa5 to 51cae57 Compare January 15, 2026 21:32
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.63.0 Update dependency realm/SwiftLint to v0.63.1 Jan 15, 2026
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 51cae57 to 80684c5 Compare January 26, 2026 22:43
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.63.1 Update dependency realm/SwiftLint to v0.63.2 Jan 26, 2026
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 80684c5 to e31e70c Compare May 27, 2026 01:11
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.63.2 Update dependency realm/SwiftLint to v0.63.3 May 27, 2026
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from e31e70c to 9dee8a5 Compare June 21, 2026 17:46
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.63.3 Update dependency realm/SwiftLint to v0.64.0 Jun 21, 2026
@renovate renovate Bot force-pushed the renovate/realm-swiftlint-0.x branch from 9dee8a5 to 94b80df Compare June 23, 2026 11:34
@renovate renovate Bot changed the title Update dependency realm/SwiftLint to v0.64.0 Update dependency realm/SwiftLint to v0.64.1 Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants