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

[YAML] codeclimate complexity tests are too sensitive, and at least partly redundant #526

Closed
trentmc opened this issue Jan 12, 2024 · 1 comment
Labels
Type: Enhancement New feature or request

Comments

@trentmc
Copy link
Member

trentmc commented Jan 12, 2024

From Trent to Calina in slack:

I just went to merge in a med-sized PR (this). It passed all tests except the new codeclimate check (first time I saw it).

Here's the PR's codeclimate report.

I like that codeclimate has tests on coverage. That's great. That was the main reason for us to add it.

It's also complaining for complexity tests: measures of cognitive complexity, number of arguments to a module, similar blocks of code in tests. This is mostly redundant with mypy (and a bit pylint).

I also tried debugging to fix its complaints, but I didn't find the command-line complexity tools that gave the same feedback as the report. (Do they exist? If yes, what is the command?)

TBH I'm thinking we should seriously consider not using codeclimate's complexity tests, given that it's mostly redundant with mypy anyway.

Or, if we do use its complexity tests, we definitely need to tune its testing parameters. (Higher threshold for cognitive complexity, allowed # arguments, etc.) Though in doing that, we're doing work that's redundant with the tuning we did for mypy... . It's a sign.

I'd prefer that we simply turn off the complexity tests.


Let's use this issue for discussion, then resolution.

@trentmc trentmc added the Type: Enhancement New feature or request label Jan 12, 2024
@calina-c
Copy link
Contributor

I’ve unchecked everything except for nested control flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants