| Total Complexity | 1 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| 1 | import re |
||
| 8 | class CSSLintBear(LocalBear, Lint): |
||
| 9 | executable = 'csslint' |
||
| 10 | arguments = '--format=compact' |
||
| 11 | output_regex = re.compile( |
||
| 12 | r'(?P<file_name>.+):\s*' |
||
| 13 | r'(?:line (?P<line>\d+), col (?P<col>\d+), )?' |
||
| 14 | r'(?P<severity>Error|Warning) - (?P<message>.*)') |
||
| 15 | severity_map = { |
||
| 16 | "Error": RESULT_SEVERITY.MAJOR, |
||
| 17 | "Warning": RESULT_SEVERITY.NORMAL} |
||
| 18 | |||
| 19 | def run(self, filename, file): |
||
| 20 | ''' |
||
| 21 | Checks the code with `csslint`. |
||
| 22 | ''' |
||
| 23 | return self.lint(filename) |
||
| 24 |