Skip to content

fix(workflows): pass --timeout to golangci-lint to fix exit code 4#68

Open
onuryilmaz wants to merge 3 commits into
mainfrom
feat/shared-go-lint-timeout
Open

fix(workflows): pass --timeout to golangci-lint to fix exit code 4#68
onuryilmaz wants to merge 3 commits into
mainfrom
feat/shared-go-lint-timeout

Conversation

@onuryilmaz

@onuryilmaz onuryilmaz commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the Timeout exceeded: try increasing it by passing --timeout option error (exit code 4) from golangci-lint.

Adds a timeout input (default: 10 minutes) passed as --timeout=<N>m directly to golangci-lint via the action's args field.

Test plan

  • Verify golangci-lint no longer exits with code 4 on slow repos
  • Verify custom timeout values are respected when passed by callers

Copilot AI review requested due to automatic review settings July 6, 2026 22:10
@onuryilmaz onuryilmaz requested a review from a team as a code owner July 6, 2026 22:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the shared Go lint reusable workflow to reduce golangci-lint “timeout exceeded” failures (exit code 4) by wiring a caller-provided timeout into both the job timeout and golangci-lint’s --timeout flag.

Changes:

  • Adds a timeout workflow input (minutes) and documents it as applying to both golangci-lint and the job.
  • Sets timeout-minutes on the lint job based on the input.
  • Passes --timeout=<N>m to golangci-lint via the action args.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/shared-go-lint.yaml Outdated
@onuryilmaz onuryilmaz force-pushed the feat/shared-go-lint-timeout branch from 8a593dd to 7c2b58b Compare July 6, 2026 22:18
Adds a timeout input (default: 10m) passed as --timeout=<N>m to
golangci-lint via the action's args field, fixing the "Timeout exceeded"
error. No job-level timeout is set.

Signed-off-by: I313226 <onur.yilmaz@sap.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .github/workflows/shared-go-lint.yaml
Comment thread .github/workflows/shared-go-lint.yaml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/shared-go-lint.yaml
… lint

Signed-off-by: I313226 <onur.yilmaz@sap.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/shared-go-lint.yaml
Signed-off-by: I313226 <onur.yilmaz@sap.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants