Merge pull request #162 from cscetbon/snyk-fix-91dbc70e38c50751439d9d… #340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: golangci-lint | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.19.0' | |
- name: Add configuration file | |
run: | | |
cat <<EOF > .golangci.yml | |
run: | |
timeout: 5m | |
issues-exit-code: 0 | |
output: | |
uniq-by-line: false | |
linters-settings: | |
gosimple: | |
checks: | |
- all | |
- '-S1023' | |
issues: | |
exclude-rules: | |
- path: .+_test.go | |
text: "package sigs.k8s.io/controller-runtime/pkg/client/fake is deprecated: please use pkg/envtest" | |
- path: .+(_test|mock_client).*.go | |
text: "is not checked" | |
EOF | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.54 |