"description": "Possible spelling error. You wrote 'seperator', but did you mean 'separator'?",
"original": "Seperator",
"replacement": "Separator",
"granularity": 1,
"locations": [],
"bypassChangedLineFiltering": null,
"context": " magic = COLOR_RED;\n break;\n case 30:\n // printf(\"Record Seperator\");\n magic = COLOR_BLUE;\n break;\n case 31:"
}
output: array of:
{
code: '',
message: 'cannot assign twice to immutable variable `x`',
range: new vscode.Range(new vscode.Position(3, 4), new vscode.Position(3, 10)),
severity: vscode.DiagnosticSeverity.Error,
source: '',
relatedInformation: [
new vscode.DiagnosticRelatedInformation(new vscode.Location(document.uri, new vscode.Range(new vscode.Position(1, 8), new vscode.Position(1, 9))), 'first assignment to `x`')
]
}
*/
/*
Extra features:
- quick-fix to apply patch
- try to get better message by parsing `description` field (per message code...)
- `locations` may be parsed into `relatedInformation`.
*/
- function translate(lint: any): vscode.Diagnostic {
+ function translate(lint: ArcanistLintMessage): vscode.Diagnostic {
let t = customLintTranslator.get(lint.code) || defaultTranslate;