Last active
December 7, 2018 13:12
-
-
Save paul-butcher/3e075c3e24e01679bb4e3a08145f6c17 to your computer and use it in GitHub Desktop.
Radon Maintainability index 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 - B (14.83) |
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 | |
| import hudson.plugins.analysis.util.model.Priority | |
| String filename = matcher.group(1) | |
| String line = 0 | |
| String type = 'maintainability' | |
| category = "maintainability" | |
| gradeMap = [B:'Medium', C:'Extremely Low'] | |
| String message = gradeMap.get(matcher.group(2))+ " maintainability: " + matcher.group(2) + " " + matcher.group(3) | |
| priorityMap = [B:Priority.NORMAL, C:Priority.HIGH] | |
| return new Warning(filename, Integer.parseInt(line), type, category, message, priorityMap.get(matcher.group(2))); |
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
| (.*) - (A|B|C) (.*) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment