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

Change Rails/EnvLocal to handle negated conditions #1374

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

fatkodima
Copy link
Contributor

Currently, EnvLocal cop does not detect !Rails.env.development? && !Rails.env.test? as an offense (!Rails.env.local?).

I found a few such cases in my project.

@@ -0,0 +1 @@
* [#1373](https://github.com/rubocop/rubocop-rails/pull/1373): Change `Rails/EnvLocal` to handle negated conditions. ([@fatkodima][])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [#1373](https://github.com/rubocop/rubocop-rails/pull/1373): Change `Rails/EnvLocal` to handle negated conditions. ([@fatkodima][])
* [#1374](https://github.com/rubocop/rubocop-rails/pull/1374): Change `Rails/EnvLocal` to handle negated conditions. ([@fatkodima][])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.
I wonder how that happened that #1373 is from 2018.

Copy link
Member

@koic koic Oct 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since that issue was transferred from rubocop/rubocop, it is not in chronological order.

@koic koic merged commit 083e24c into rubocop:master Oct 7, 2024
14 checks passed
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.

2 participants