Created
November 29, 2018 12:39
-
-
Save paul-butcher/ed73b21c18ab081fbf8f751986e31956 to your computer and use it in GitHub Desktop.
Radon CC warnings plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myproj/myfile.py | |
| M 185:4 MyClass.my_method - C (12) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hudson.plugins.warnings.parser.Warning | |
| String filename = matcher.group(1) | |
| String line = matcher.group(2) | |
| gradeMap = [A:'low - simple block', | |
| B:'low - well structured and stable block', | |
| C:'moderate - slightly complex block', | |
| D:'more than moderate - more complex block', | |
| E:'high - complex block, alarming', | |
| F:'very high - error-prone, unstable block'] | |
| String message = gradeMap.get(matcher.group(4))+ " " + matcher.group(4) + " " + matcher.group(5) | |
| return new Warning(filename, Integer.parseInt(line), 'complexity', 'complexity', message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (.*)\n\W+.\W(\d+):\d+\W(.*) - (A|B|C|D|E|F) (.*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment