rubocop-config-example
.rubocop.yml
This file is not meant to be modified
This is the main configuration file.
It is used by default by your IDE, lefthook, the command line; and most
importantly, the CI.
This file should have no cops, and act only as a child file, inheriting from,
in order:
.rubocop_global.yml # or the file with the weird name
.rubocop_project.yml
.rubocop_todo.yml
.rubocop_local.yml
.rubocop_raw.yml
This file is not meant to be modified
Same as above, but without inheriting from the todo
file.
As with .rubocop.yml, this file should have no cops, and only inherit from
elsewhere.
The purpose of this file is to be used with IDEs or rubocop CLI, so you can
SEE THE TRUTH.
.rubocop_global.yml
This file is not meant to be modified
This is Company's global rubocop config; the starting point for all of our
projects.
This file is hosted online, and is autoupdated locally by rubocop when needed.
In the project, this file will have a weird ass name.
.rubocop_project.yml
This if the file to be modified after team decisions
Anything deviating from Company's global standards should go here.
This should mainly include DSLs handling and exclusions.
.rubocop_todo.yml
This file is autogenerated
This file is autogenerated by rubocop with the intent of providing a clean run
afterwards.
For each file, every cop that has offenses will be completely disabled.
Recreate this file after rebasing and before pushing with this command:
rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit $(rubocop -L | wc -l)
.rubocop_local.yml
The use of this file is completely optional for developers
If by any change you want to adjust cops to be even more strict, this is the
place to do it.
One should have extreme care as to make changes be compliant with the default
config, as that is the one used by the CI.
As inherited files must be present, this file should be commited to the repo,
and ignored with git --update-index --skip-worktree
if modified.