Skip to content

no_extension_access_modifier rule triggers incorrectly for nonisolated extension #6168

@lukaskollmer

Description

@lukaskollmer

Bug Description

The no_extension_access_modifier rule triggers for a nonisolated extension, which is incorrect since the nonisolated here isn't an access control modifier.
(The ability to use the nonisolated keyword on extensions was added with Swift 6.1.)

@MainActor
struct Test {}

nonisolated extension Test {} // No Extension Access Modifier Violation: Prefer not to use extension access modifiers (no_extension_access_modifier)

Environment

  • SwiftLint version: 0.59.1
  • Xcode version: Xcode 16.4 (16F6)
  • Installation method used: built from source
  • Configuration file:
    enabled_rules:
      - no_extension_access_modifier
  • no nested configurations

Metadata

Metadata

Assignees

Labels

bugUnexpected and reproducible misbehavior.good first issueIssue to be taken up by new contributors yet unfamiliar with the project.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions