diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 00000000..5e329d86 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,24 @@ +--- +run: + concurrency: 6 + timeout: 5m +issues: + # Maximum issues count per one linter. + # Set to 0 to disable. + # Default: 50 + max-issues-per-linter: 0 + # Maximum count of issues with the same text. + # Set to 0 to disable. + # Default: 3 + max-same-issues: 0 + new-from-rev: "" + exclude-rules: + - path: 'test/.*' + linters: + - gosec +linters: + enable: + - gofmt + - goimports + - gosec + - govet diff --git a/Makefile b/Makefile index d91a26c4..27a72163 100644 --- a/Makefile +++ b/Makefile @@ -57,3 +57,6 @@ clean-test-artifacts: ## removes bundles and zarf packages that have been create push-test-artifacts: ## Push artifacts that UDS CLI tests rely on to GHCR cd hack && ./push-test-artifacts.sh + +lint: ## Run golangci-lint on the project + golangci-lint run ./src/...