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

ValidSigil parsing behaves differently than sorbet sigil parsing #169

Closed
jakebrady5 opened this issue Aug 4, 2023 · 0 comments · Fixed by #170
Closed

ValidSigil parsing behaves differently than sorbet sigil parsing #169

jakebrady5 opened this issue Aug 4, 2023 · 0 comments · Fixed by #170

Comments

@jakebrady5
Copy link
Contributor

Bug Description

The ValidSigil cop considers any valid sigil value followed by any non-word non-whitespace character to be valid. Sorbet does not. This conflict causes the ValidSigil cop to be overly permissive of functionally invalid sigil values.

Practical Example

A sample file began with this sigil:

# typed: false # rubocop:todo Sorbet/StrictSigil

A similar regex bug in spoom caused spoom to erroneously bump the sigil to:

# typed: true# rubocop:todo Sorbet/StrictSigil

This new true# sigil is functionally ignored by Sorbet, but does not cause a rubocop error despite being an invalid sigil value.

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

Successfully merging a pull request may close this issue.

1 participant