You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like there's no existing linter for function length (number of lines, or number of lines of code). Would that be a valuable addition?
I ask because I've been asked to code review a package that other people wrote, and there are several extremely long functions, and it would be nice to get a linter to report these facts for me. =)
Obviously I am aware that there's no agreed-upon max length for functions, that number of lines of code is a poor indicator of complexity, etc. - would like to get something that at least gets in the right ballpark, though.
The text was updated successfully, but these errors were encountered:
I believe the good practice has this, among other things. Or if not literally a check for line length it has a cyclomatic complexity check, which should usually flag the same functions
Some of the functions I'm looking at are hundreds of lines long without much branching complexity at all.
Would line length be a more appropriate addition here, or in Good Practice? Do you imagine this package accumulating lots of different linters that people contribute, or farming that out to other derived packages? Or something in the middle where people can declare linter dependencies in their .lintr file, maybe?
* [WIP] linter works
* adds linting for cyclomatic complexity.
incurs dependency on cyclocomp.
closes#361.
* updates NEWS for cyclocomp_linter
* less verbose message for cyclocomp_linter
* update tests to new message
It looks like there's no existing linter for function length (number of lines, or number of lines of code). Would that be a valuable addition?
I ask because I've been asked to code review a package that other people wrote, and there are several extremely long functions, and it would be nice to get a linter to report these facts for me. =)
Obviously I am aware that there's no agreed-upon max length for functions, that number of lines of code is a poor indicator of complexity, etc. - would like to get something that at least gets in the right ballpark, though.
The text was updated successfully, but these errors were encountered: