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

cyclocomp default: 15 or 25? #693

Closed
AshesITR opened this issue Dec 6, 2020 · 2 comments · Fixed by #695
Closed

cyclocomp default: 15 or 25? #693

AshesITR opened this issue Dec 6, 2020 · 2 comments · Fixed by #695
Labels
feature a feature request or enhancement

Comments

@AshesITR
Copy link
Collaborator

AshesITR commented Dec 6, 2020

Currently effective default linter is cyclocomp_linter(complexity_limit = 15L):

https://github.com/jimhester/lintr/blob/2e1baab648a9baa5e1f48e2ca16b41a9b5559ebb/R/zzz.R#L80

However, the default argument says cyclocomp_linter(complexity_limit = 25L)

https://github.com/jimhester/lintr/blob/2e1baab648a9baa5e1f48e2ca16b41a9b5559ebb/R/cyclocomp_linter.R#L7

They should be synchronized imo. But what should be the default value?
15 is a lot stricter than 25.

We have one function lint() with a CC exceeding 25 (30) while there are 9 functions with a CC exceeding 15 (see #653)

Any thoughts?
cc @jimhester @russHyde @MichaelChirico

@russHyde
Copy link
Collaborator

russHyde commented Dec 6, 2020

I'd tighten them both to 15. Anyone using the defaults would be unaffected, anyone setting their own limit would be unaffected. The only pipelines affected would have 'linters: cyclocomp_linter' (or similar) with the linting function explicit but without arguments in the .lintr.

@jimhester
Copy link
Member

I agree with @russHyde

@russHyde russHyde added the feature a feature request or enhancement label Dec 9, 2020
psychelzh added a commit to CAMP-BNU/preproc-mri that referenced this issue Oct 10, 2023
See r-lib/lintr#693

Signed-off-by: Liang Zhang <psychelzh@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants