grunt-complexity
grunt-complexity copied to clipboard
Only fail build on errors and allow lower severities to pass
Add option so that complicated functions that have a lower severity than error will not fail the build.
I would have usually used a "breakOnlyOnError" type option instead of "allowWarnings", but both "breakError" and "errorsOnly" are already in use. Redefining those would cause backwards-compat issues, hence the slightly oddly named allowWarnings. Defaults to false to maintain existing behaviour.