Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unneeded_override doesn't check init #5265

Closed
2 tasks
inotetw opened this issue Oct 5, 2023 · 1 comment · Fixed by #5270
Closed
2 tasks

unneeded_override doesn't check init #5265

inotetw opened this issue Oct 5, 2023 · 1 comment · Fixed by #5270
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.

Comments

@inotetw
Copy link

inotetw commented Oct 5, 2023

New Issue Checklist

Describe the bug

unneeded_override rule does not check init

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint lint

Environment

  • SwiftLint version 0.52.3
  • Installation method used CocoaPods

In the following code, override init() will not trigger:

    override init() {
        super.init()
    }

    override func printHi() {
        super.printHi()
    }
@SimplyDanny SimplyDanny added enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project. labels Oct 5, 2023
@leonardosrodrigues0
Copy link
Contributor

I opened #5270 with a new option for the rule to affect initializers. I set the option to false by default but I don't know if it is the best decision. It is also my first PR here, so if anyone has suggestions please feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Ideas for improvements of existing features and rules. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants