Skip to content

Unneeded Synthesized Initializer removes needed initializers with property wrappers #5153

Description

@NachoSoto

New Issue Checklist

Describe the bug

This new rule correct actually needed initializers. Example:

private struct Data {
    @PropertyWrapper<E> var e: E

    init(e: E) {
        self.e = e
    }
}

SwiftLint removes that constructor, but it is required to be able to initialize it with a value of type E instead of @PropertyWrapper<E>

Environment

  • SwiftLint version: 0.52.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    repro-neededIssues that cannot be reproduced or miss proper descriptive examples.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions