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

Changes will be needed after rubocop gem hits 1.0 version #45

Closed
dmytro-savochkin opened this issue Oct 17, 2020 · 0 comments · Fixed by #46
Closed

Changes will be needed after rubocop gem hits 1.0 version #45

dmytro-savochkin opened this issue Oct 17, 2020 · 0 comments · Fixed by #46

Comments

@dmytro-savochkin
Copy link

In rubocop gem version 1.0 there will be a breaking change (rubocop/rubocop#8490) that will affect rubocop-i18n. That PR with a breaking change has been already merged into master so that means version 1.0 is going to be released reasonably soon.

This is the description of the breaking change:

Change logic for cop department name computation. Cops inside deep namespaces (5 or more levels deep) now belong to departments with names that are calculated by joining module names starting from the third one with slashes as separators. For example, cop Rubocop::Cop::Foo::Bar::Baz now belongs to Foo/Bar department (previously it was Bar).

Due to this rubocop-i18n will need to update its documentation in README.md file to correctly address new department names. Basically the only thing to do is to add I18n/ before all the departments and cop names that would go in .rubocop.yml file. This is required because all the cops in this gem are "deep" (5 levels of nesting).

So instead of this:

GetText:
RailsI18n:
GetText/DecorateString:
GetText/DecorateFunctionMessage:
GetText/DecorateStringFormattingUsingInterpolation:
GetText/DecorateStringFormattingUsingPercent:
RailsI18n/DecorateString:
RailsI18n/DecorateStringFormattingUsingInterpolation:

it should be like this:

I18n/GetText:
I18n/RailsI18n:
I18n/GetText/DecorateString:
I18n/GetText/DecorateFunctionMessage:
I18n/GetText/DecorateStringFormattingUsingInterpolation:
I18n/GetText/DecorateStringFormattingUsingPercent:
I18n/RailsI18n/DecorateString:
I18n/RailsI18n/DecorateStringFormattingUsingInterpolation:

As far as I can see it's the only change due to that PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant