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

Ability to configure which warnings to use

Open GMNGeoffrey opened this issue 4 years ago • 5 comments

It would be great if the extension allowed configuration for which buildifier warnings to use (matching the --warnings flag to buildifier).

GMNGeoffrey avatar Jul 13 '20 01:07 GMNGeoffrey

even ideally, pass arbitrary buildifier flags would absolutely fit the bill

steeve avatar Sep 01 '20 08:09 steeve

Definitely love to have it and be able to disable certain lint errors (for example load on top)

MikeZhu92 avatar Apr 02 '21 16:04 MikeZhu92

Some of the warnings are quite egregious and don't need to be seen all the time in normal development, for instance 'print'. Currently, the only way to disable this and still use the Bazel extension is to disable buildifier completely by passing in a fake executable to the Buildifier Executable setting, e.g. /bin/false

kchantrell-codan avatar Mar 17 '22 00:03 kchantrell-codan

Possibly even better would be to support the .buildifier.json file.

cj81499 avatar Feb 03 '23 17:02 cj81499

Unfortunately, this feature is not supported yet So I created a wrapper around the binary to disable the warning this is hack

#!/usr/bin/bash

/usr/local/bin/buildifier $* --warnings=-module-docstring

Simon-Chenzw avatar Mar 15 '24 09:03 Simon-Chenzw