-
-
Notifications
You must be signed in to change notification settings - Fork 285
Description
Related to MaMpf-HD/mampf#768.
We don't use the default location of the RuboCop config file: .rubocop.yml. Instead, we configure it as .config/.rubocop.yml and specify the config CLI option via --config .config/.rubocop.yml. However, in this custom location, some offenses are not reported.
🎈 Expected behavior
We expect RuboCop Rails to give us exactly the same output for these two commands (given that the config file is moved to the correct location respectively):
bundle exec rubocop --config .rubocop.yml
bundle exec rubocop --config ./.config/.rubocop.yml
# expect outputs to be the sameWe don't use any general "exclude" patterns that would depend on the relative file location of the config file.
(only one "exclude" file pattern for a specific rule that is not relevant here)
🎈 Actual behavior
When we run the following command, we get no offenses at all.
bundle exec rubocop --config ./.config/.rubocop.yml
# 780 files inspected, no offenses detectedWhen we run the following command, we get offenses:
bundle exec rubocop --config .rubocop.yml
# 780 files inspected, 94 offenses detectedThese offenses include (among others):
Rails/ThreeStateBooleanColumnRails/I18nLocaleAssignmentRails/DangerousColumnNamesRails/NotNullColumn
RuboCop version
$ bundle exec rubocop -V
1.78.0 (using Parser 3.3.8.0, Prism 1.4.0, rubocop-ast 1.46.0, analyzing as Ruby 3.3, running on ruby 3.3.8) [x86_64-linux]
- rubocop-performance 1.25.0
- rubocop-rails 2.32.0