When I invoke the rubocop command using version 0.47.1, I sometimes get the following warning output
Lint/Eval has the wrong namespace - should be Security
Lint/Eval has the wrong namespace - should be Security
Lint/Eval has the wrong namespace - should be Security
Lint/Eval has the wrong namespace - should be Security
Unfortunately, it doesn't happen consistently. I first saw the warning last night and I tried deleting a couple older versions of rubocop. The problem went away. Today, it started happening again. I wiped out all versions of rubocop and reinstalled. 0.47.1 is the only one on my system and the warning is gone (for now).
Likely you have some references to Lint/Eval in your config or in RuboCop directives embedded in your code. The cop was renamed to Security/Eval recently.
Thank you. I had some RuboCop directives referencing Lint/Eval.
Any idea why I don't see this warning consistently? Here is the output I just received on two back-to-back rubocop runs:
vagrant@vagrant (foo) (master $) $ rubocop
Inspecting 314 files
..................................................................................................................................
/home/vagrant/Documents/dev/foo/lib/foo/host_autoload_paths.rb: Lint/Eval has the wrong namespace - should be Security
/home/vagrant/Documents/dev/foo/lib/fook/host_autoload_paths.rb: Lint/Eval has the wrong namespace - should be Security
........................................................................................................................................................................................
314 files inspected, no offenses detected
vagrant@vagrant (foo) (master $) $ rubocop
Inspecting 314 files
..........................................................................................................................................................................................................................................................................................................................
314 files inspected, no offenses detected
I understand RuboCop caches results to speed up analysis. However, I would expect the Lint/Eval warnings to always display in the results. If I run with rubocop --cache false, everything works as expected; I consistently get the Lint/Eval warnings in the results.
Most helpful comment
Likely you have some references to
Lint/Evalin your config or in RuboCop directives embedded in your code. The cop was renamed toSecurity/Evalrecently.