hydromad
hydromad copied to clipboard
Look into cyclomatic complexity
lintr:
##[warning]functions should have cyclomatic complexity of less than 15
@jnothman - we might need some advice on how to deal with this one
You need to run lintr locally to see where the problem is ;) But basically it's saying "This function can't be tested or easily reasoned about as a unit because it has too many independent conditionals. Split it into multiple functions."
It's an issue that needs case-by-case treatment. It's also an instance where it is truly only a warning, not a reason to refuse a contribution.
Thanks! I'll have another look when the number of lintr warnings goes down. I assume there's a way of suppressing the lintr warning for a particular function if needed, with some decorator.