From e8b48ddece267bfde7c0565a8ec39fd5b53cee72 Mon Sep 17 00:00:00 2001 From: Nicolas Peugnet Date: Mon, 13 Sep 2021 11:32:53 +0200 Subject: Add golangci job to build workflow (#2) * Update build.yml * disable golang-ci for tests * fix args syntax * make errchek only a warning * report only new lint issues --- .github/workflows/build.yml | 12 ++++++++++-- .golangci.yaml | 10 ++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .golangci.yaml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f09e7bf..4276554 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,8 +7,16 @@ on: branches: [ main ] jobs: - - build: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: golangci-lint + uses: golangci/golangci-lint-action@v2 + with: + version: v1.29 + only-new-issues: true + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000..7c47848 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,10 @@ +run: + tests: false + +severity: + default-severity: error + rules: + - severity: warning + linters: + - errcheck # for now, make errcheck only a warning, remove it later + - deadcode -- cgit v1.2.3