Skip to content
Merged
4 changes: 3 additions & 1 deletion .github/workflows/go-pr-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ jobs:
- name: Run GolangCI-Lint (direct)
if: steps.detect-make.outputs.use_make != 'true'
working-directory: ${{ matrix.app.working_dir }}
run: golangci-lint run ${{ inputs.golangci_lint_args }}
env:
GOLANGCI_LINT_ARGS: ${{ inputs.golangci_lint_args }}
run: golangci-lint run $GOLANGCI_LINT_ARGS

# ============================================
# SECURITY SCANNING
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/go-pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ on:
description: 'GolangCI-Lint version'
type: string
default: 'v1.62.2'
golangci_lint_args:
description: 'Extra arguments passed to golangci-lint (e.g. --timeout=5m)'
type: string
default: '--timeout=5m'
app_name_prefix:
description: 'Prefix used to namespace coverage/build artifacts'
type: string
default: ''
Comment thread
coderabbitai[bot] marked this conversation as resolved.
coverage_threshold:
description: 'Minimum coverage percentage required (0-100)'
type: number
Expand Down Expand Up @@ -208,6 +216,8 @@ jobs:
runner_type: ${{ inputs.runner_type }}
go_version: ${{ inputs.go_version }}
golangci_lint_version: ${{ inputs.golangci_lint_version }}
golangci_lint_args: ${{ inputs.golangci_lint_args }}
app_name_prefix: ${{ inputs.app_name_prefix }}
coverage_threshold: ${{ inputs.coverage_threshold }}
fail_on_coverage_threshold: ${{ inputs.fail_on_coverage_threshold }}
go_private_modules: ${{ inputs.go_private_modules }}
Expand Down
2 changes: 2 additions & 0 deletions docs/go-pr-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ The `go-analysis`, `security` and `lib-version` pipelines each have a `*-gate` a
| `target_branches_for_source_check` | Target branches requiring source validation | string | `main` |
| `go_version` | Go version | string | `1.23` |
| `golangci_lint_version` | GolangCI-Lint version | string | `v1.62.2` |
| `golangci_lint_args` | Extra arguments passed to golangci-lint (e.g. `--timeout=5m`) | string | `--timeout=5m` |
| `app_name_prefix` | Prefix used to namespace coverage/build artifacts | string | `''` |
| `coverage_threshold` | Minimum coverage percentage (0-100) | number | `80` |
| `fail_on_coverage_threshold` | Fail when coverage is below threshold | boolean | `false` |
| `go_private_modules` | GOPRIVATE pattern for private modules | string | `''` |
Expand Down