vscode-bazel
vscode-bazel copied to clipboard
Linting and formatting not working with latest version of VS Code
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?
Try removing the trailing slash from "bazel.buildifierExecutable": "/usr/local/bin/buildifier/",.