keith / buildifier-prebuilt

A bazel toolchain for using prebuilt binaries for buildifier and buildozer
MIT License
35 stars 13 forks source link

Fix passing multiple `lint_warnings` to `buildifier` #75

Closed fmeum closed 1 year ago

fmeum commented 1 year ago

Buildifier accepts a single --warning flag with a comma-separated list of warnings to enable/disable instead of a repeated flag usage.

Also removes mentions of all - some warnings in examples as Buildifier doesn't support this. Due to the bug fixed by this PR, these settings previously resulted in default - some.

fmeum commented 1 year ago

@keith This fix is partially backwards incompatible as lint_warnings = ["all", "-foo"] will now fail with an error rather than silently check for the default set of warnings with foo disabled. We could fix this in buildifier first.

keith commented 1 year ago

so previously all -foo -bar would just do -bar? and with this change all -foo -bar would be all,-foo,-bar which will just error? i think it's fine enough to make it error and force folks to realize this if they had a broken config

fmeum commented 1 year ago

Yes, exactly