Skip to content

Rule Request: Redundant final for actors #6407

@akuzminskyi

Description

@akuzminskyi

New Issue Checklist

New Rule Request

actors in Swift already final by default. but developers still sometimes write it as final actor and it doesn't produce any compiler warnings. But basically final is redundant in this case. similar to internal ACL.

I don't see any configuration for the rule. and I think it should be enabled by default as it doesn't change "logic".

final actor DataStorage {

->

actor DataStorage {

https://github.com/swiftlang/swift-evolution/blob/main/proposals/0306-actors.md#actors-2

hey are reference types like classes, but do not support inheritance, and therefore do not have (or need) features such as required and convenience initializers, overriding, or class members, open and final.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIssue to be taken up by new contributors yet unfamiliar with the project.rule-requestRequests for a new rules.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions