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

Split "ClassAndModuleChildren" rule in 2 rules #12851

Open
WaKeMaTTa opened this issue Apr 17, 2024 · 0 comments
Open

Split "ClassAndModuleChildren" rule in 2 rules #12851

WaKeMaTTa opened this issue Apr 17, 2024 · 0 comments

Comments

@WaKeMaTTa
Copy link

Is your feature request related to a problem? Please describe.

In my company we use this rules:

  • Use always plural for namespaces. This namespaces need to be Modules.
  • Use always singular for object. This object need to be Classes.

The result is:

module Companies::Products
  class TagService
  end
end

Then then rubocop is always complaying. The rubocop rule that complains is ClassAndModuleChildren

Describe the solution you'd like

I would like to split the rubocop rule Style/ClassAndModuleChildren in 2.

Having Style/ClassChildren and Style/ModuleChildren, it would allow me to define it this way:

Style/ModuleChildren:
  EnforcedStyle: "compact"
Style/ClassChildren:
  EnforcedStyle: "nested"
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

No branches or pull requests

1 participant