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

Lint/EmptyConditionalBody Error #10534

Closed
baarkerlounger opened this issue Apr 13, 2022 · 1 comment
Closed

Lint/EmptyConditionalBody Error #10534

baarkerlounger opened this issue Apr 13, 2022 · 1 comment

Comments

@baarkerlounger
Copy link

rubocop throws an error on Lint/EmptyConditionalBody


Expected behavior

Rubocop parses the file and does not throw an error

Actual behavior

1 error occurred:
An error occurred while Lint/EmptyConditionalBody cop was inspecting file.rb

Steps to reproduce the problem

Code block throwing the error:

map_row(row).each do |attr_key, attr_val|
          update = case_log.update(attr_key => attr_val)
          unless update
            # TODO: determine what to do
          end
        rescue ArgumentError
          # TODO: determine what we want to do
        end

RuboCop version

1.27. This was error was not being thrown on 1.25.

1.27.0 (using Parser 3.1.2.0, rubocop-ast 1.17.0, running on ruby 3.1.1 x86_64-linux)
  - rubocop-performance 1.13.3
  - rubocop-rails 2.13.2
  - rubocop-rake 0.6.0
  - rubocop-rspec 2.9.0
@koic
Copy link
Member

koic commented Apr 13, 2022

This issue is a dup with #10514 and resolved by #10516.

@koic koic closed this as completed Apr 13, 2022
@koic koic added the duplicate label Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants