mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 07:48:02 -06:00
lintfixes
This commit is contained in:
+14
-17
@@ -48,26 +48,23 @@ class CleanCompiler extends BaseCompiler {
|
||||
const typeeerrorRegex = /^Type error \[.*,(\d*),(.*)\]:\s(.*)/i;
|
||||
return utils.splitLines(output).map(line => {
|
||||
let matches = line.match(errorRegex);
|
||||
if (!matches) matches = line.match(typeeerrorRegex);
|
||||
|
||||
if (matches) {
|
||||
return "<source>:" + matches[1] + ",0: error: (" + matches[2] + ") " + matches[3];
|
||||
}
|
||||
|
||||
matches = line.match(errorLineRegex);
|
||||
if (matches) {
|
||||
return "<source>:" + matches[1] + ",0: error: " + matches[2];
|
||||
} else {
|
||||
matches = line.match(errorLineRegex);
|
||||
if (matches) {
|
||||
return "<source>:" + matches[1] + ",0: error: (" + matches[2] + ") " + matches[3];
|
||||
} else {
|
||||
matches = line.match(parseerrorRegex);
|
||||
if (matches) {
|
||||
return "<source>:" + matches[1] + "," + matches[2] + ": error: (" + matches[3] + ") " + matches[3];
|
||||
} else {
|
||||
matches = line.match(typeeerrorRegex);
|
||||
if (matches) {
|
||||
return "<source>:" + matches[1] + ",0: error: (" + matches[2] + ") " + matches[3];
|
||||
} else {
|
||||
return line;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
matches = line.match(parseerrorRegex);
|
||||
if (matches) {
|
||||
return "<source>:" + matches[1] + "," + matches[2] + ": error: (" + matches[3] + ") " + matches[4];
|
||||
}
|
||||
|
||||
return line;
|
||||
}).join("\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user