File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 22#
33# SPDX-License-Identifier: AGPL-3.0-only
44
5- name : Build matrix-tool Docker Images
5+ name : matrix-tools linting and building
66
77on :
88 pull_request :
1818 GO_VERSION : " 1.24"
1919
2020jobs :
21+ gofmt :
22+ permissions :
23+ contents : read
24+ packages : read
25+ runs-on : ubuntu-latest
26+ steps :
27+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
28+
29+ - uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6
30+ with :
31+ go-version : " ${{ env.GO_VERSION }}"
32+
33+ - name : gofmt check
34+ run : |
35+ unformatted_files="$(gofmt -l matrix-tools)"
36+ if [ "$unformatted_files" != "" ]; then
37+ echo "There are .go files that aren't formatted correctly:"
38+ echo "$unformatted_files"
39+ exit 1
40+ fi
41+
2142 tests :
2243 permissions :
2344 contents : read
Original file line number Diff line number Diff line change 1+ CI: check that all go files are formatted correctly as per ` gofmt ` .
You can’t perform that action at this time.
0 commit comments