Skip to content

Commit 222c508

Browse files
committed
fix: correct buildifier.json format and adjust CI lint checks
- Fix buildifier.json to use correct field names (warningsList not warnings) - Use proper JSON structure based on buildifier -config=example output - Make CI check formatting strictly but show lint warnings as informational - Set local mode to 'fix' for developer convenience
1 parent de54149 commit 222c508

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

.buildifier.json

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
{
2-
"version": 4,
3-
"lint": {
4-
"mode": "warn",
5-
"warnings": [
6-
"+load",
7-
"+load-on-top",
8-
"+out-of-order-load",
9-
"+unused-variable",
10-
"+function-docstring",
11-
"+function-docstring-args",
12-
"+print"
13-
]
14-
}
2+
"type": "auto",
3+
"mode": "fix",
4+
"lint": "warn",
5+
"warningsList": [
6+
"load",
7+
"load-on-top",
8+
"out-of-order-load",
9+
"unused-variable",
10+
"function-docstring",
11+
"function-docstring-args",
12+
"print",
13+
"module-docstring",
14+
"name-conventions",
15+
"redefined-variable",
16+
"same-origin-load",
17+
"unreachable"
18+
]
1519
}

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ jobs:
2626
- name: Check Buildifier Formatting
2727
run: |
2828
echo "Checking Bazel file formatting..."
29-
bazel run //:buildifier -- --lint=warn --mode=check -r .
29+
# Check only formatting, not lint warnings (for now)
30+
bazel run //:buildifier -- --mode=check -r .
3031
31-
- name: Check for Unused Dependencies
32+
- name: Show Lint Warnings (Informational)
3233
run: |
33-
echo "Checking for unused dependencies in BUILD files..."
34-
# This will warn about unused deps but not fail the build
35-
bazel run //:buildifier -- --lint=warn --warnings=load -r . || true
34+
echo "Showing lint warnings (informational only - won't fail the build)..."
35+
# Show warnings but don't fail the CI
36+
bazel run //:buildifier -- --lint=warn --mode=check -r . || true
3637
3738
test:
3839
name: Test on ${{ matrix.os }}

0 commit comments

Comments
 (0)