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

Autocorrect bug with Explicit Init rule #5289

Closed
2 tasks done
BB9z opened this issue Oct 19, 2023 · 0 comments · Fixed by #5296
Closed
2 tasks done

Autocorrect bug with Explicit Init rule #5289

BB9z opened this issue Oct 19, 2023 · 0 comments · Fixed by #5296
Labels
bug Unexpected and reproducible misbehavior. good first issue Issue to be taken up by new contributors yet unfamiliar with the project.

Comments

@BB9z
Copy link
Contributor

BB9z commented Oct 19, 2023

New Issue Checklist

Steps to reproduce

$ swiftlint --version
0.53.0

$ echo "f { e in\n    A.init(e: e)\n}" >> z1.swift

$ cat z1.swift
f { e in
    A.init(e: e)
}

$ swiftlint z1.swift --autocorrect --enable-all-rules
Correcting Swift files at paths z1.swift
Correcting 'z1.swift' (1/1)
/Users/.../Documents/z1.swift:2:6 Corrected Explicit Init
Done correcting 1 file!

$ cat z1.swift
f { e inA(e: e)
}

The lint result should be

f { e in
    A(e: e)
}
@SimplyDanny SimplyDanny added bug Unexpected and reproducible misbehavior. good first issue Issue to be taken up by new contributors yet unfamiliar with the project. labels Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior. 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
@BB9z @SimplyDanny and others