Skip to content

False positive triggers for async_without_await in actor with init() async #6423

Closed

Description

@akuzminskyi

New Issue Checklist

Bug Description

In the following example, async_without_await suggest to remove async from init method, but it causes an error.

actor A {
    init() async {
        foo()
    }

    func foo() {}
}
Image

This is only for actor as we can write without await, so it doesn't affect other data types.

Mention the command or other SwiftLint integration method that caused the issue. Include stack traces or command output.

$ swiftlint lint

Environment

  • SwiftLint version: 0.63.0
  • Xcode version: 26.0.1
  • Installation method used: Universal macOS Binary
  • Configuration file:
only_rules:
- async_without_await

Are you using nested configurations? If so, paste their
relative paths and respective contents.

Activity

  1. SimplyDanny commented on Jan 9, 2026

    @SimplyDanny
    Collaborator

    It's probably best to just ignore initializers of actors from the analysis.

  2. added
    bug
    good first issue
    on Jan 9, 2026
  3. self-assigned this
    on Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions