diff --git a/package-lock.json b/package-lock.json index 68c9783..3987548 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "vscode-motoko", - "version": "0.16.0", + "version": "0.16.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "vscode-motoko", - "version": "0.16.0", + "version": "0.16.1", "hasInstallScript": true, "dependencies": { "@wasmer/wasi": "1.2.2", diff --git a/package.json b/package.json index f60f717..58e0995 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-motoko", "displayName": "Motoko", "description": "Motoko language support", - "version": "0.16.0", + "version": "0.16.1", "publisher": "dfinity-foundation", "repository": "https://github.com/dfinity/vscode-motoko", "engines": { diff --git a/src/server/server.ts b/src/server/server.ts index 836c03c..91b7037 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -106,6 +106,9 @@ const ignoreGlobs = [ '**/.vessel/.tmp/**/*', // temporary Vessel files ]; +const shouldHideWarnings = (uri: string) => + uri.includes('/.vessel/') || uri.includes('/.mops/'); + const packageSourceCache = new Map(); async function getPackageSources( directory: string, @@ -866,6 +869,11 @@ function checkImmediate(uri: string | TextDocument): boolean { !new RegExp(settings!.hideWarningRegex).test(message), ); } + if (resolvedUri && shouldHideWarnings(resolvedUri)) { + diagnostics = diagnostics.filter( + ({ severity }) => severity === DiagnosticSeverity.Error, + ); + } } const diagnosticMap: Record = { [virtualPath]: [], // Start with empty diagnostics for the main file