Skip to content

Commit

Permalink
lint buf
Browse files Browse the repository at this point in the history
  • Loading branch information
feuGeneA committed Jun 28, 2024
1 parent 0271db2 commit 01d6860
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,16 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Install buf
uses: bufbuild/buf-setup-action@v1.31.0
with:
github_token: ${{ github.token }}

- name: Run Lint
run: ./scripts/lint.sh --go-lint

- name: Ensure protobuf changes are checked in
run: |
scripts/protobuf_codegen.sh
git diff-index HEAD # to show the differences
git diff-index --quiet HEAD || (echo 'protobuf generated code changes have not all been checked in' && exit 1)
2 changes: 2 additions & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ source $RELAYER_PATH/scripts/versions.sh

go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCI_LINT_VERSION}
golangci-lint run --config=$RELAYER_PATH/.golangci.yml --build-tags=testing ./... --timeout 5m

(cd proto && buf lint)

0 comments on commit 01d6860

Please sign in to comment.