Skip to content

Commit

Permalink
checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vtopc committed Feb 25, 2024
1 parent 538b911 commit 7528324
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- v*
branches:
- master
- main
pull_request:

jobs:
Expand Down Expand Up @@ -37,11 +38,7 @@ jobs:

lint:
name: lint
strategy:
matrix:
go-version: [ 1.17.x, 1.18.x ] # support latest 2 major versions
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -51,18 +48,11 @@ jobs:
go-version-file: ./go.mod
cache: true # caching and restoring go modules and build outputs

- name: Check that 'go mod tidy' was called before commit
run: go mod tidy && git diff --exit-code

- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.56

# Optional: golangci-lint command line arguments.
# TODO: switch to .golangci.yml
args: >
--tests=false
-E bodyclose -E golint -E rowserrcheck -E gosec -E interfacer
-E unconvert -E dupl -E goconst -E gocognit -E goimports -E maligned -E unparam
-E dogsled -E prealloc -E gocritic -E wsl -E goprintffuncname
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
skip-cache: true # cache/restore is done by actions/setup-go step

0 comments on commit 7528324

Please sign in to comment.