From dd99c82b5678e92600062fda25e75c7a8536b78a Mon Sep 17 00:00:00 2001 From: "Wu, Zhenyu" Date: Wed, 5 Aug 2026 20:40:45 +0800 Subject: [PATCH] feat: pass file name to shellcheck --- server/src/shellcheck/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/src/shellcheck/index.ts b/server/src/shellcheck/index.ts index c55bce63..85250ffb 100644 --- a/server/src/shellcheck/index.ts +++ b/server/src/shellcheck/index.ts @@ -115,6 +115,7 @@ export class Linter { const result = await this.runShellCheck( documentText, shellName, + document.uri, effectiveSourcePaths, additionalShellCheckArguments, ) @@ -132,6 +133,7 @@ export class Linter { private async runShellCheck( documentText: string, shellName: string | null, + uri: string, sourcePaths: string[], additionalArgs: string[] = [], ): Promise { @@ -142,6 +144,7 @@ export class Linter { const args = [ '--format=json1', + `--file-name=${uri}`, ...(this.externalSources ? ['--external-sources'] : []), ...sourcePathsArgs, ...additionalArgs,