ci = codeIssues()
ci = codeIssues(names)
ci = codeIssues(names, Name, Value)
export(ci, filename)
ci = fix(ci)
| Parameter | Description |
|---|---|
| names | a string, string array, or cell array of character vectors: files or folders to analyze. |
| CodeAnalyzerConfiguration | a string: JSON configuration file. |
| IncludeSubfolders | a logical scalar: true to recursively analyze folders. |
| Parameter | Description |
|---|---|
| ci | a codeIssues object. Its Issues and SuppressedIssues properties are Nelson tables. |
codeIssues runs the Nelson code analyzer and stores active and suppressed diagnostics in table properties.
The JSON configuration file uses the same version 2 format as checkcode: extends, files.include, files.exclude, rules, and ci.failOn.
The export method writes JSON, CSV, or text according to the output file extension.
The fix method applies only trivial automatic fixes in this version: trailing whitespace and missing final newline.
ci = codeIssues([nelsonroot(), '/modules/interpreter/functions'], ...
'CodeAnalyzerConfiguration', [nelsonroot(), '/nelson-lint.json'], ...
'IncludeSubfolders', true);
ci.Issues
{
"version": 2,
"files": {
"include": ["**/*.m", "**/*.xml"],
"exclude": [".git", "build", "target", "bin", "x64", "generated"]
},
"rules": {
"NLS0001": { "level": "error" },
"NLS0013": { "level": "error" },
"NLS0012": { "level": "warning", "options": { "maxLineLength": 120 } }
},
"ci": { "failOn": "warning" }
}
| Version | Description |
|---|---|
| 2.0.0 | initial version |