Skip to content

Commit

Permalink
Fix buildifier formatting for MODULE.bazel and WORKSPACE
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Dec 11, 2023
1 parent 76ff407 commit 93a9478
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,13 @@ static ImmutableList<String> getCommandLineArgs(String binary, BuildFile buildFi
}

private static String fileTypeArg(BlazeFileType fileType) {
return fileType == BlazeFileType.SkylarkExtension ? "--type=bzl" : "--type=build";
return "--type="
+ switch (fileType) {
case SkylarkExtension -> "bzl";
case BuildPackage -> "build";
case Workspace -> "workspace";
case MODULE -> "module";
};
}

private static Iterable<String> pathArg(@Nullable BuildFile buildFile) {
Expand Down

0 comments on commit 93a9478

Please sign in to comment.