vscode-bazel
vscode-bazel copied to clipboard
Support using @com_github_bazelbuild_buildtools//buildifier instead of download buildifier manully
trafficstars
Buildifier can be run directly with bazel:
bazel run @com_github_bazelbuild_buildtools//buildifier -- -version
is it possible to use @com_github_bazelbuild_buildtools//buildifier if it was found in WORKSPACE?
It looks like the command gets directly run in a shell, so you can actually set your buildifier path to something like:
"bazel.buildifierExecutable": "cd /my/workspace && bazel run @com_github_bazelbuild_buildtools//buildifier --",
Unfortunately you can't use variable substitution like ${workspaceFolder} here until this lands.
Obviously this is kind of a hacky workaround but it does work!