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

Fix standard directives being ignored in files without any rubocop reference #498

Merged
merged 2 commits into from Jan 4, 2023
Merged

Fix standard directives being ignored in files without any rubocop reference #498

merged 2 commits into from Jan 4, 2023

Conversation

andreccosta
Copy link
Contributor

Version 1.20 upgraded rubocop 1.40. That version of Rubocop contains an optimization which breaks checking for directives in files that do not have any reference to "rubocop" due to this change.

This did not trigger a fail in any test here because the fixture has a reference to "rubocop" within it. Removing it triggers this scenario.

Fixes #497.

@andreccosta andreccosta changed the title fix: update no_directives if standard directives present Fix standard directives being ignored in files without any rubocop reference Dec 22, 2022
@searls
Copy link
Contributor

searls commented Dec 22, 2022

I won't have access to a computer for a couple weeks. Could you add a test and fixture for this?

@andreccosta
Copy link
Contributor Author

Sure. I added a new fixture (based on the existing but with no reference to "rubocop") and respective test.
Not too sure using the term "isolated" is correct here so please do let me know if I should reword these.

@leastbad
Copy link

Thank you for your work on this, @andreccosta. I thought I was losing it.

@Roguelazer
Copy link

Anything we can do to help this get merged?

@leastbad
Copy link

leastbad commented Jan 3, 2023

Anything we can do to help this get merged?

  gem.add_development_dependency "standard", "1.19.1"
  gem.add_development_dependency "standardrb"

... until further notice.

@searls
Copy link
Contributor

searls commented Jan 4, 2023

Sorry, I was computerless for the last few weeks. Looks good to merge. Thanks @andreccosta!

@searls searls merged commit df531ab into standardrb:main Jan 4, 2023
@searls
Copy link
Contributor

searls commented Jan 4, 2023

Landed in 1.21.1

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 this pull request may close these issues.

# standard:disable seems to have stopped working in 1.20
4 participants