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

Add explicit style to Rails/I18nLazyLookup #1052

Merged
merged 1 commit into from
Jul 28, 2023

Conversation

sunny
Copy link
Contributor

@sunny sunny commented Jul 22, 2023

Adds a new explicit style to the Rails/I18nLazyLookup cop (and names the default one lazy).

This way we can enforce the use of fully qualified i18n key names eg. "recipes.show.title" rather than shorthand ".title".

See also: cookpad/global-style-guides#203


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
  • If this is a new cop, consider making a corresponding update to the Rails Style Guide.

@sunny sunny force-pushed the add-explicit-option-to-i18n-lazy-lookup branch from b010ad5 to 929cc88 Compare July 22, 2023 08:37
@sunny sunny marked this pull request as ready for review July 22, 2023 08:38
@sunny sunny force-pushed the add-explicit-option-to-i18n-lazy-lookup branch from 929cc88 to 5d9b254 Compare July 22, 2023 08:42
@koic koic merged commit bef142f into rubocop:master Jul 28, 2023
10 checks passed
@koic
Copy link
Member

koic commented Jul 28, 2023

Thanks!

@sunny
Copy link
Contributor Author

sunny commented Jul 29, 2023

Thank you for maintaining rubocop-rails @koic 🙏🏻 💙

@sunny sunny deleted the add-explicit-option-to-i18n-lazy-lookup branch July 29, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants