Merge pull request #278 from sombraSoft/fix/bazel-lint-errors

Fix: Bazel Lint Errors and CI Workflow
This commit is contained in:
Matt Liberty 2025-09-30 17:07:33 +00:00 committed by GitHub
commit 05b292c379
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 44 additions and 0 deletions

44
.github/workflows/buildifier.yaml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Lint Bazel
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
buildifier:
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
check:
- name: Run buildifier format
run: ./buildifier -r -mode=check -lint=off .
- name: Run buildifier lint
run: ./buildifier -r -lint=warn .
name: ${{ matrix.check.name }}
env:
BUILDIFIER_VERSION: v8.2.1
steps:
- name: Checkout Code
uses: actions/checkout@v5
- name: Cache buildifier
id: cache-buildifier
uses: actions/cache@v4
with:
path: ./buildifier
key: ${{ runner.os }}-buildifier-${{ env.BUILDIFIER_VERSION }}
- name: Download buildifier
if: steps.cache-buildifier.outputs.cache-hit != 'true'
run: |
wget https://github.com/bazelbuild/buildtools/releases/download/${BUILDIFIER_VERSION}/buildifier-linux-amd64 -O buildifier
chmod +x buildifier
- name: ${{ matrix.check.name }}
run: ${{ matrix.check.run }}