File tree Expand file tree Collapse file tree 5 files changed +30
-6
lines changed Expand file tree Collapse file tree 5 files changed +30
-6
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # Complete list of style options can be found at:
2+ # http://clang.llvm.org/docs/ClangFormatStyleOptions.html
3+ ---
4+ Language : Cpp
5+ BasedOnStyle : Google
6+ Standard : Cpp11
7+ BinPackParameters : false
8+ BinPackArguments : false
9+ ...
Original file line number Diff line number Diff line change 11load (":choose_clang_format.bzl" , "choose_clang_format" )
22
3+ filegroup (
4+ name = "clang_format_config_default" ,
5+ srcs = [ ".clang-format" ],
6+ )
7+
8+ label_flag (
9+ name = "clang_format_config" ,
10+ build_setting_default = ":clang_format_config_default" ,
11+ visibility = ["//visibility:public" ],
12+ )
13+
314choose_clang_format (
415 name = "clang_format_bin" ,
516 visibility = ["//visibility:public" ],
@@ -21,7 +32,12 @@ sh_binary(
2132 ],
2233 data = [
2334 ":_clang_format_bin" ,
24- "// :clang_format_config" ,
35+ ":clang_format_config" ,
2536 ],
2637 visibility = ["//visibility:public" ],
2738)
39+
40+ exports_files (
41+ glob (["*.bzl" ]) + ["run_clang_format.sh" ] + [".clang-format" ],
42+ visibility = ["//visibility:public" ],
43+ )
Original file line number Diff line number Diff line change 11def _choose_clang_format (ctx ):
2+ print ("I'M CHOOSING CLANG FORMAT" )
23 out = ctx .actions .declare_file ("clang_format_bin.sh" )
34
45 ctx .actions .run_shell (
Original file line number Diff line number Diff line change @@ -53,8 +53,8 @@ clang_format_check_aspect = aspect(
5353 implementation = _clang_format_check_aspect_impl ,
5454 fragments = ["cpp" ],
5555 attrs = {
56- "_clang_format" : attr .label (default = Label ("//bazel/ clang_format:clang_format" )),
57- "_clang_format_config" : attr .label (default = Label ( "//:clang_format_config" ) ),
58- "_clang_format_bin" : attr .label (default = Label ("//bazel/ clang_format:clang_format_bin" )),
56+ "_clang_format" : attr .label (default = Label ("//clang_format:clang_format" )),
57+ "_clang_format_config" : attr .label (default = "//clang_format :clang_format_config" ),
58+ "_clang_format_bin" : attr .label (default = Label ("//clang_format:clang_format_bin" )),
5959 },
6060)
You can’t perform that action at this time.
0 commit comments