diff --git a/tools/warn.py b/tools/warn.py index 8ea45df40..bb3b08d98 100755 --- a/tools/warn.py +++ b/tools/warn.py @@ -30,9 +30,24 @@ def colorforseverity(sev): if sev == severity.HARMLESS: return 'limegreen' if sev == severity.UNKNOWN: - return 'blue' + return 'lightblue' return 'grey' +def headerforseverity(sev): + if sev == severity.FIXMENOW: + return 'Critical warnings, fix me now' + if sev == severity.HIGH: + return 'High severity warnings' + if sev == severity.MEDIUM: + return 'Medium severity warnings' + if sev == severity.LOW: + return 'Low severity warnings' + if sev == severity.HARMLESS: + return 'Harmless warnings' + if sev == severity.UNKNOWN: + return 'Unknown warnings' + return 'Unhandled warnings' + warnpatterns = [ { 'category':'make', 'severity':severity.MEDIUM, 'members':[], 'option':'', 'description':'make: overriding commands/ignoring old commands', @@ -623,16 +638,21 @@ def tablerow(text): output(text,) output('') -def begintable(text, backgroundcolor): +def begintable(text, backgroundcolor, extraanchor): global anchor output('