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

Spike: Dynamic applying of an ideal linter configuration against new code #2486

Open
fallwith opened this issue Mar 6, 2024 · 1 comment

Comments

@fallwith
Copy link
Contributor

fallwith commented Mar 6, 2024

Our existing rubocop.yml and .rubocop_todo.yml configurations along with our RuboCop version lock applied by newrelic_rpm.gemspec layer together to provide us with a stable linting platform that has very relaxed rules to accommodate our 15 year old code base.

Unfortunately this platform is incapable of automatically and objectively identifying problems with code that is newly introduced to the project via internal maintainer PRs. Code that would ordinarily violate 3 or so complexity rules or a max column count rule will either require a human reviewer to identify or float on through with a merge to pile on more tech debt.

I wonder what our options are for applying the most ideal configuration using the latest linter version against new code while still maintaining a relaxed and stable configuration for existing code.

Maybe we could run an ideal lint and cross-reference the problematic lines with the list of new or altered lines. Maybe a dedicated Action could be performed that doesn't impact the PR's status could be inspected by a reviewer.

For the purposes of this issue, an ideal linter configuration would be represented by the .rubocop.yml file itself. Currently, we have relaxations that were intended to be temporary that are stored in .rubocop.yml itself. Whether as a part of this issue or with a separate one, we should ultimately move all temporary rules out into .rubocop_todo.yml.

@workato-integration
Copy link

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

No branches or pull requests

1 participant