Skip to content

Commit 7582224

Browse files
committed
THRIFT-5969: Enforce gofmt -s in CI
1 parent 1668e19 commit 7582224

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/sca.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,30 @@ jobs:
185185
-i lib/c_glib/test/gen-cpp \
186186
--error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib
187187
188+
lib-go:
189+
needs: compiler
190+
runs-on: ubuntu-24.04
191+
strategy:
192+
matrix:
193+
go:
194+
- '1.26'
195+
fail-fast: false
196+
steps:
197+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
198+
with:
199+
persist-credentials: false
200+
201+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
202+
with:
203+
go-version: ${{ matrix.go }}
204+
205+
- name: Run gofmt
206+
# Args:
207+
# -s: Simplify code
208+
# -d: Display changes, and exit non-zero when changes present
209+
# -e: Report all errors instead of only the first 10
210+
run: gofmt -s -d -e $(git ls-files | grep "\.go$")
211+
188212
lib-python:
189213
needs: compiler
190214
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)