Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Log when on save processes start #1869
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Mar 11, 2019
1 parent 4a241f8 commit 058eccf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/goBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export function goBuild(fileUri: vscode.Uri, isMod: boolean, goConfig: vscode.Wo
}

if (buildWorkspace && currentWorkspace && !isTestFile) {
outputChannel.appendLine(`Starting building the current workspace at ${currentWorkspace}`);
return getNonVendorPackages(currentWorkspace).then(pkgs => {
running = true;
return runTool(
Expand All @@ -116,6 +117,7 @@ export function goBuild(fileUri: vscode.Uri, isMod: boolean, goConfig: vscode.Wo
let currentGoWorkspace = getCurrentGoWorkspaceFromGOPATH(getCurrentGoPath(), cwd);
let importPath = currentGoWorkspace ? cwd.substr(currentGoWorkspace.length + 1) : '.';
running = true;
outputChannel.appendLine(`Starting building the current package at ${cwd}`);
return runTool(
buildArgs.concat('-o', tmpPath, importPath),
cwd,
Expand Down
8 changes: 5 additions & 3 deletions src/goLint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ export function goLint(fileUri: vscode.Uri, goConfig: vscode.WorkspaceConfigurat

if (scope === 'workspace' && currentWorkspace) {
args.push('./...');
}

if (scope === 'file') {
outputChannel.appendLine(`Starting linting the current workspace at ${currentWorkspace}`);
} else if (scope === 'file') {
args.push(fileUri.fsPath);
outputChannel.appendLine(`Starting linting the current file at ${fileUri.fsPath}`);
} else {
outputChannel.appendLine(`Starting linting the current package at ${cwd}`);
}

running = true;
Expand Down
2 changes: 2 additions & 0 deletions src/goVet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export function goVet(fileUri: vscode.Uri, goConfig: vscode.WorkspaceConfigurati
vetArgs = ['tool', 'vet', ...vetFlags, ...tagsArg, '.'];
}

outputChannel.appendLine(`Starting "go vet" under the folder ${cwd}`);

running = true;
return runTool(
vetArgs,
Expand Down

0 comments on commit 058eccf

Please sign in to comment.