Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 5, 2025

This PR contains the following updates:

Package Update Change
realm/SwiftLint minor 0.58.2 -> 0.62.1

Release Notes

realm/SwiftLint (realm/SwiftLint)

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

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


Configuration

📅 Schedule: 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 becomes conflicted, 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 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 1f67eeb to 28c00b2 Compare April 15, 2025 20:01
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 28c00b2 to 70772a0 Compare August 31, 2025 09:28
@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 70772a0 to 982ca61 Compare September 7, 2025 23:22
@renovate renovate bot changed the title Update dependency realm/SwiftLint to v0.60.0 Update dependency realm/SwiftLint to v0.61.0 Sep 7, 2025
@renovate renovate bot force-pushed the renovate/realm-swiftlint-0.x branch from 982ca61 to c7e2df9 Compare October 13, 2025 20:43
@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 c7e2df9 to 07e2ffe Compare October 14, 2025 00:33
@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
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