Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix calculation of cop department for nested departments
This fixes an issue I ran into with rubocop-i18n. This gem provides two nested departments, I18n/RailsI18n and I18n/GetText. The intent is to enable one and disable the other. However, disabling a department would not disable its cops. I tracked this issue down to how RuboCop::Config calculates a cops department before looking at that department's configuration: It only considers the part before the first `/`. This commit changes this method by considering instead all parts before the last `/`.
- Loading branch information
Showing
3 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* [#9258](https://github.com/rubocop-hq/rubocop/pull/9258): Fix calculation of cop department for nested departments. ([@mvz][]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters