You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preamble: Spent an entire day tracking down a CI issue that came down to an exit in a Rails task. That seemed to me like the kind of thing 'rubocop-rails' should catch, so I popped in here to make a feature request only to realize (as I was doing my pre-issue due diligence) that there is a cop for it and it just didn't catch this for whatever reason.
The Problem: An exit in a Rails task went unreported by RuboCop. The project's RuboCop config has no exceptions for this rule, nor is the path ignored.
# ".rubocop.yml"require:
-⸱rubocop-faker-⸱rubocop-railsAllCops:
TargetRubyVersion:⸱3.2TargetRailsVersion:⸱6.1NewCops:⸱enableSuggestExtensions:⸱falseStyle/FrozenStringLiteralComment:
# Enforces use of the frozen_string_literal comment in every file.Enabled: false
A RuboCop error from the Rails/Exit cop for file "lib/tasks/weekly_update.rake" on the exit line.
Actual behavior
~/dev $rubocop lib/tasks/weekly_update.rake
1 file inspected, no offenses detected
--
0 Total in 0 files
Steps to reproduce the problem
Offending code (and config) is provided above.
RuboCop version
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
You can see extension cop versions (e.g. rubocop-rails, rubocop-performance, and others) output by rubocop -V,
include them as well. Here's an example:
Preamble: Spent an entire day tracking down a CI issue that came down to an
exit
in a Rails task. That seemed to me like the kind of thing 'rubocop-rails' should catch, so I popped in here to make a feature request only to realize (as I was doing my pre-issue due diligence) that there is a cop for it and it just didn't catch this for whatever reason.The Problem: An
exit
in a Rails task went unreported by RuboCop. The project's RuboCop config has no exceptions for this rule, nor is the path ignored.Offending Code:
Expected behavior
A RuboCop error from the
Rails/Exit
cop for file "lib/tasks/weekly_update.rake" on theexit
line.Actual behavior
Steps to reproduce the problem
Offending code (and config) is provided above.
RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler. Here's an example:You can see extension cop versions (e.g. rubocop-rails, rubocop-performance, and others) output by rubocop -V,
include them as well. Here's an example:
The text was updated successfully, but these errors were encountered: