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

Option for extra newline on autocorrection of ValidSigil #119

Open
maxveldink opened this issue Aug 2, 2022 · 0 comments
Open

Option for extra newline on autocorrection of ValidSigil #119

maxveldink opened this issue Aug 2, 2022 · 0 comments

Comments

@maxveldink
Copy link

When autocorrecting the Sorbet/ValidSigil cop on files without any magic string comments at the top, it adds the sigil without an extra newline like so:

# typed: false
class Banana
...

This generally trips the Layout/EmptyLineAfterMagicComment cop and a subsequent auto correct needs to be run. This is okay locally, but can be annoying in CI when we're using a tool like Pronto to make suggestions; we need to run the job again to pick up this difference.

It would be great to introduce an option to this cop to insert an extra blank line when it adds the magic string up top. I can imagine some teams would not like that behavior, but an option seems reasonable.

Would love some thoughts on this, or if I'm missing an easy way around this issue. I'll work on a PR soon to implement the option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant