lintfixes

This commit is contained in:
Partouf
2018-10-14 02:14:22 +02:00
parent 8e47608769
commit 49388146fa
+14 -17
View File
@@ -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");
}