vscode-bazel icon indicating copy to clipboard operation
vscode-bazel copied to clipboard

Linting and formatting not working with latest version of VS Code

Open markustoivonen opened this issue 3 years ago • 1 comments

Hi,

I am unable to get the linting and formatting of build files working. I am running the latest version of both VS Code (1.66.2) and the plugin (0.5.0).

My VS Code settings.json file contains these configurations:

"bazel.buildifierFixOnFormat": true,
"bazel.buildifierExecutable": "/usr/local/bin/buildifier/",
"bazel.executable": "bazelisk",
"bazel.enableCodeLens": true,

And I am able to lint and format files from CLI just fine with

/usr/local/bin/buildifier -lint=warn path/to/build/file.bazel

My VS Code CLI windows show no errors and I wasn't able to find anything in the VS Code logs either.

Any ideas what might be the issue?

markustoivonen avatar Apr 25 '22 12:04 markustoivonen

Try removing the trailing slash from "bazel.buildifierExecutable": "/usr/local/bin/buildifier/",.

jfirebaugh avatar Sep 12 '22 16:09 jfirebaugh