Skip to content

Commit 293e8d2

Browse files
authored
fix(inspections): run inspections only on Tact files (#378)
1 parent 467c4c4 commit 293e8d2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/src/server.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,9 @@ connection.onInitialize(async (initParams: lsp.InitializeParams): Promise<lsp.In
371371
const file = findFile(uri)
372372
index.addFile(uri, file)
373373

374-
await runInspections(uri, file)
374+
if (event.document.languageId === "tact" || uri.endsWith(".tact")) {
375+
await runInspections(uri, file)
376+
}
375377
})
376378

377379
documents.onDidChangeContent(async event => {
@@ -392,7 +394,9 @@ connection.onInitialize(async (initParams: lsp.InitializeParams): Promise<lsp.In
392394
const file = findFile(uri, event.document.getText(), true)
393395
index.addFile(uri, file, false)
394396

395-
await runInspections(uri, file)
397+
if (event.document.languageId === "tact" || uri.endsWith(".tact")) {
398+
await runInspections(uri, file)
399+
}
396400
})
397401

398402
connection.onDidChangeWatchedFiles((params: DidChangeWatchedFilesParams) => {

0 commit comments

Comments
 (0)