Skip to content

Commit 0592d2b

Browse files
committed
change output format to 'eclipse'
1 parent 7d5a4f2 commit 0592d2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: src/lint.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function analysisResult(diagnosticCollection: vscode.DiagnosticCollection
3636
diagnosticCollection.clear();
3737

3838
// 1 = path, 2 = line, 3 = severity, 4 = message
39-
let regex = /^(.*)\(([0-9]+)\):\s*(\w+):(.*\s+\[.*\])\s+\[([0-9]+)\]/gm;
39+
let regex = /^(.*):([0-9]+):\s*(\w+):(.*\s+\[.*\])\s+\[([0-9]+)\]/gm;
4040
let regexArray: RegExpExecArray;
4141
let fileData: { [key: string]: RegExpExecArray[] } = {};
4242
while (regexArray = regex.exec(result)) {
@@ -68,7 +68,7 @@ export function analysisResult(diagnosticCollection: vscode.DiagnosticCollection
6868

6969
let l = doc.lineAt(line);
7070
let r = new vscode.Range(line, 0, line, l.text.length);
71-
let d = new vscode.Diagnostic(r, `(${severity}) ${message}`, cpplintSeverityToDiagnosticSeverity(severity));
71+
let d = new vscode.Diagnostic(r, `${message}`, cpplintSeverityToDiagnosticSeverity(severity));
7272
d.source = 'cpplint';
7373
diagnostics.push(d);
7474
}

Diff for: src/runner.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function runCppLint(filename: string, workspaces: string[], enableworkspa
3636
let config = ConfigManager.getInstance().getConfig();
3737
let cpplint = config["cpplintPath"];
3838
let linelength = "--linelength=" + config['lineLength'];
39-
let param: string[] = ['--output=vs7', linelength];
39+
let param: string[] = ['--output=eclipse', linelength];
4040

4141
if (config['excludes'].length != 0) {
4242
config['excludes'].forEach(element => {
@@ -123,4 +123,4 @@ function lint(exec: string, params: string[]) {
123123
let stderr = result.stderr;
124124
let out = [result.stdout, result.stderr]
125125
return out;
126-
}
126+
}

0 commit comments

Comments
 (0)