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

False positive in Rails/WhereNotWithMultipleConditions #834

Closed
thiemonipro opened this issue Oct 25, 2022 · 0 comments
Closed

False positive in Rails/WhereNotWithMultipleConditions #834

thiemonipro opened this issue Oct 25, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@thiemonipro
Copy link

thiemonipro commented Oct 25, 2022

Expected behavior

I would expect that rubocop does not throw an error on the where.not clause.

Actual behavior

It throws the following error
An error occurred while Rails/WhereNotWithMultipleConditions cop was inspecting /Users/thiemoseys/nephroflow/nephroflow-api/MVP_rubocop.rb:1:0.

Steps to reproduce the problem

Make a ruby file with for example the line below that we use to check for empty jsonb columns in postgresql.
instances.where.not(data: {})
then run rubocop -A 'file'.rb

RuboCop version

$ [bundle exec] rubocop -V
1.37.1 (using Parser 3.1.2.1, rubocop-ast 1.23.0, running on ruby 3.1.1) [arm64-darwin21]
  - rubocop-performance 1.15.0
  - rubocop-rails 2.17.0
  - rubocop-rspec 2.12.1
@thiemonipro thiemonipro changed the title False positive in Rails/WhereNotWithMultipleConditions False positive in Rails/WhereNotWithMultipleConditions Oct 25, 2022
@koic koic added the bug Something isn't working label Oct 25, 2022
@koic koic closed this as completed in 8663b04 Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants