From 062003ccda108906e23ee76a048eb7927251a4a9 Mon Sep 17 00:00:00 2001 From: Fredrik Averpil Date: Sun, 12 May 2024 13:21:27 +0200 Subject: [PATCH] feat: add go linting --- .github/workflows/lint.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6d0663a..7cdba37 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,3 +12,24 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} version: latest args: --check . + + go: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.22 + - name: Check formatting + run: go fmt ./... + working-directory: ./tests/go + - name: Check linting + run: go vet ./... + working-directory: ./tests/go + - name: Check golines + run: | + go install -u github.com/segmentio/golines + golines -w . + working-directory: ./tests/go