Skip to content

New buildifier versions need to be told what type of file they're formatting #128

@chiphogg

Description

@chiphogg

Apparently, buildifier is for more than just BUILD files these days. See here: https://github.com/bazelbuild/buildtools/pull/431/files

The upshot is that, in order to format BUILD files, buildifier needs to know what type of file it's formatting. This is done with the -type flag, as in:

buildifier -type=build

There are probably several different ways we could go here. We could introduce buildifier_options, but that conflicts with some of the desires expressed in #66. Probably the best way would be for codefmt to decide what flags to pass based on the filename, so we would automatically do the right thing for both .bzl and BUILD files... although, this might not work well for older versions of buildifier!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions