Skip to content

Commit a2caa52

Browse files
authored
Merge pull request #123 from ChrisCummins/feature/buildifier_122
Format bazel build files.
2 parents 378ad9c + 4fba486 commit a2caa52

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

.github/workflows/lint.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,17 @@ jobs:
2929
run: python3 -m isort . --check-only --diff --profile black
3030
- name: black
3131
run: python3 -m black . --check --diff --target-version py36
32+
33+
bazel:
34+
name: Bazel
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v2
38+
- name: Install go
39+
uses: actions/setup-go@v2
40+
with:
41+
go-version: '^1.13.1'
42+
- name: Install buildifier
43+
run: go get github.com/bazelbuild/buildtools/buildifier
44+
- name: buildifier
45+
run: find . \( -name BUILD -o -name WORKSPACE \) -print0 | xargs -0 buildifier -mode=diff

programl/graph/format/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ cc_test(
111111
"//programl/proto:program_graph_cc",
112112
"@labm8//labm8/cpp:status",
113113
"@labm8//labm8/cpp:test",
114-
]
114+
],
115115
)
116116

117117
cc_library(

programl/graph/py/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ py_library(
3636
data = [":program_graph_builder_pybind.so"],
3737
visibility = ["//visibility:public"],
3838
deps = [
39-
"//programl/proto:program_graph_py",
4039
"//programl/proto:program_graph_options_py",
40+
"//programl/proto:program_graph_py",
4141
],
4242
)
4343

@@ -48,8 +48,8 @@ py_test(
4848
":program_graph_builder",
4949
"//programl/proto:edge_py",
5050
"//programl/proto:node_py",
51-
"//programl/proto:program_graph_py",
5251
"//programl/proto:program_graph_options_py",
52+
"//programl/proto:program_graph_py",
5353
"//third_party/py/labm8",
5454
],
5555
)

tools/format.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ else
1313
nproc=1
1414
fi
1515

16+
find . \( -name 'BUILD' -o -name 'WORKSPACE' \) -print0 | xargs -0 buildifier
1617
find . -name '*.h' -print0 | xargs -0 -n8 -P"$nproc" clang-format -i
1718
find . -name '*.cc' -print0 | xargs -0 -n8 -P"$nproc" clang-format -i
1819
find . -name '*.py' -print0 | xargs -0 -n8 -P"$nproc" isort --profile black

0 commit comments

Comments
 (0)