diff --git a/actions/golangci-lint/action.yml b/actions/golangci-lint/action.yml index def6487..bb9e59e 100644 --- a/actions/golangci-lint/action.yml +++ b/actions/golangci-lint/action.yml @@ -1,6 +1,12 @@ name: 'GolangCi Static Code Analysis' description: 'GolangCi Static Code Analysis' +inputs: + staticcheck-checks: + description: 'Staticcheck checks configuration' + required: false + default: 'all' + runs: using: 'composite' steps: @@ -8,6 +14,18 @@ runs: shell: bash run: go mod download + - name: Configure staticcheck + shell: bash + run: | + if [ ! -f .golangci.yml ]; then + cat > .golangci.yml << 'EOF' + linters-settings: + staticcheck: + checks: + - "${{ inputs.staticcheck-checks }}" + EOF + fi + - name: Static Code Analysis uses: golangci/golangci-lint-action@v8 with: