File tree Expand file tree Collapse file tree 6 files changed +13
-14
lines changed Expand file tree Collapse file tree 6 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 6565 run : aspect lint
6666 - name : Format
6767 working-directory : example
68- run : aspect format
68+ # Only format one language to keep CI time reasonable
69+ run : aspect format --format_target=//tools/format:format_Shell_with_shfmt --all_files=true
6970 test :
7071 strategy :
7172 matrix :
Original file line number Diff line number Diff line change 1+ use_task("lint/lint.axl", "lint")
2+ use_task("format/format.axl", "format")
Original file line number Diff line number Diff line change 11axl_local_dep(
2- name = "lint",
3- path = "../lint",
4- auto_use_tasks = True,
5- )
6-
7- axl_local_dep(
8- name = "format",
9- path = "../format",
2+ name = "rules_lint",
3+ path = "..",
104 auto_use_tasks = True,
115)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -84,13 +84,16 @@ def impl(ctx: TaskContext) -> int:
8484
8585 formatter = build_formatter(ctx)
8686
87- changed_files = find_changed_files(out, ctx.std.process)
88- out.write("Formatting changed files:\n%s" % changed_files)
87+ format_args = []
88+ if not ctx.args.all_files:
89+ changed_files = find_changed_files(out, ctx.std.process)
90+ out.write("Formatting changed files:\n%s" % changed_files)
91+ format_args = changed_files.split("\n")
8992
9093 exit = bazel_run(
9194 ctx,
9295 entrypoint = formatter,
93- args = changed_files.split("\n") ,
96+ args = format_args ,
9497 ).wait()
9598
9699 if not exit.success:
@@ -101,6 +104,7 @@ def impl(ctx: TaskContext) -> int:
101104format = task(
102105 implementation = impl,
103106 args = {
107+ "all_files": args.boolean(default = False),
104108 "format_target": args.string(default = "//tools/format"),
105109 },
106110)
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments