summaryrefslogtreecommitdiff
path: root/test/fixers/test_buildifier_fixer_callback.vader
AgeCommit message (Collapse)Author
2021-03-23Switch to using buildifier's -path option (#3640)Jon Parise
Buildifier offers a -path command line option: > Buildifier's reformatting depends in part on the path to the file > relative to the workspace directory. Normally buildifier deduces > that path from the file names given, but the path can be given > explicitly with the -path argument. This is especially useful when > reformatting standard input, or in scripts that reformat a temporary > copy of a file. This lets us drop our `-type`-guessing logic. For the moment, we rely on the buffer filename being "relative to the workspace directory", which it generally is, but in a future change, we should introduce logic that will locate the WORKSPACE file and adjusts the filename relative to that directory. This could be complicated based on the working directory in which `buildifier` is executed, so a little more research is necessary to implement that logic correctly.
2021-03-20#3633 - Put all dummy test files in test/test-filesw0rp
2021-02-21Add a buildifier fixer for Bazel files (#3499)Jon Parise
This fixer enables buildifier's formatting and "lint fix" modes. Additional options can be provided via `bazel_buildifier_options`. It also implements some basic logic for guessing the file's type. buildifier itself usually does this based on the filenames provided on the command line, but because we're piping our buffer via stdin, we need to do this manually.