Skip to content

[CE] Add Naming/FileName rule checking expected class/module per filename

Gabriel Mazetto requested to merge ce-rubocop-naming-filename into master

What does this MR do?

Add a rubocop cop to match filenames with expected Class/Module names to prevent NameError: uninitialized constant because of a failure to require a file using autoload.

Are there points in the code the reviewer needs to double check?

There is also an EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4882 to check that everything is building correctly EE conflict MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4892

Why was this MR needed?

NameError: uninitialized constant SystemCheck::Geo::FdwSchemaUptoDateCheck when runnning rake gitlab:geo:check was not detected during review process

This can be automated by using Rubocop cops

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4878

Edited by 🤖 GitLab Bot 🤖

Merge request reports