From 19d3c4de97cfe3e97b690f14482ce678dcb05bb7 Mon Sep 17 00:00:00 2001 From: Brandon Weeks Date: Tue, 1 Nov 2022 12:01:50 -0700 Subject: [PATCH] Run golangci-lint as part of CI https://golangci-lint.run/usage/install/#ci-installation --- .github/workflows/golangci-lint.yml | 18 ++++++++++++++++++ .golangci.yaml | 5 +++++ 2 files changed, 23 insertions(+) create mode 100644 .github/workflows/golangci-lint.yml create mode 100644 .golangci.yaml diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml new file mode 100644 index 0000000..876de83 --- /dev/null +++ b/.github/workflows/golangci-lint.yml @@ -0,0 +1,18 @@ +name: golangci-lint +on: + pull_request: +permissions: + contents: read +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.19.3 + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.50.1 diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..a8ad39d --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,5 @@ +linters: + enable: + - gofmt + disable: + - errcheck