Filter more unused warnings from compile errors in kvscode
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
(when (FileSystem.exists lastConfigDir)
|
||||
(FileSystem.rename lastConfigDir activeConfigDir))
|
||||
// When user config fails to build, use the default
|
||||
// Counterintuitively, this unless is correct:
|
||||
(unless fallbackToDefault
|
||||
(warningMessage "Falling back to the default Kiss-VSCode Config")
|
||||
(unless config
|
||||
|
@@ -102,7 +102,8 @@
|
||||
null)))))
|
||||
|
||||
(function :Void showCompileError [errorMessage]
|
||||
(ifLet [compileErrors (R.distinctMatches
|
||||
(ifLet [errorMessage (.join (filter (errorMessage.split "\n") ->[:String l] (= -1 (l.indexOf "This case is unused"))) "\n")
|
||||
compileErrors (R.distinctMatches
|
||||
(R.group
|
||||
(R.namedGroup "file"
|
||||
(R.repeat (R.oneOf R.anyLetter R.anyDigit (R.escape "/")) 1) // filename
|
||||
@@ -117,7 +118,8 @@
|
||||
errorMessage)]
|
||||
{
|
||||
(Vscode.window.showErrorMessage errorMessage)
|
||||
(awaitLet [chosen (quickPickMap (for match (filter compileErrors ->match (= -1 (match.match.indexOf "This case is unused"))) =>match.match match))]
|
||||
(awaitLet [chosen (quickPickMap (for match compileErrors =>match.match match))]
|
||||
(Vscode.window.showErrorMessage chosen.match)
|
||||
(executeCommand "workbench.action.quickOpen" (substr (chosen.namedGroup "file") 0 -1)))
|
||||
}
|
||||
(Vscode.window.showErrorMessage errorMessage)))
|
Reference in New Issue
Block a user