dapperfu / mcodestyle

mcodestyle - Matlab style guide checker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2023-Sept

This tool has been superceeded by:

See matlab-codeissues-jenkins for a working example.

matlab_mflakes

pyflakes for matlab.

Jenkins

Requires Warnings.

Define a new parser at http://[jenkins-url]/configure and create a new parser in section Compiler Warnings.

Regex

^([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)\|([^|]+)\|

Mapping Script

import hudson.plugins.warnings.parser.Warning
import hudson.plugins.analysis.util.model.Priority

String fileName = matcher.group(1)
Integer lineNumber = Integer.parseInt(matcher.group(2))
String type =  matcher.group(3)
String category = matcher.group(4)
String message = matcher.group(5)
String severity = matcher.group(6)

Priority priority = Priority.NORMAL

switch (severity) {
    case "H":
        priority = Priority.HIGH
        break
    case "N":
        priority = Priority.NORMAL
        break
    case "L":
        priority = Priority.LOW
        break
    default:
        priority = Priority.NORMAL
}

return new Warning(fileName, lineNumber, type, category, message, priority)

About

mcodestyle - Matlab style guide checker

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:MATLAB 100.0%