Skip to content

Enforce regexpdynamicpattern linter in CI (cgo.yml) - #52954

Merged
pelikhan merged 2 commits into
mainfrom
copilot/add-regexpdynamicpattern-linter
Aug 15, 2026
Merged

Enforce regexpdynamicpattern linter in CI (cgo.yml)#52954
pelikhan merged 2 commits into
mainfrom
copilot/add-regexpdynamicpattern-linter

Conversation

Copilot AI commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

regexpdynamicpattern flags regexp.Compile/MustCompile/CompilePOSIX/MustCompilePOSIX calls with dynamically-built patterns that can't be validated at compile time. The linter is type-resolved and correct, but was never added to the CI-enforced LINTER_FLAGS in cgo.yml, so it ran advisory-only.

  • CI enforcement: added -regexpdynamicpattern to both LINTER_FLAGS definitions in .github/workflows/cgo.yml (the default run and the GOOS=js GOARCH=wasm variant).
  • Verification: confirmed zero violations across the enforced package set (./pkg/console ./pkg/parser ./pkg/styles ./pkg/tty ./pkg/workflow) via make golint-custom LINTER_FLAGS="-regexpdynamicpattern -test=false" LINTER_PACKAGES="./pkg/console ./pkg/parser ./pkg/styles ./pkg/tty ./pkg/workflow" — all known dynamic-pattern sites already carry justified nolint:regexpdynamicpattern suppressions.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add regexpdynamicpattern linter to CI enforcement Enforce regexpdynamicpattern linter in CI (cgo.yml) Aug 15, 2026
Copilot AI requested a review from pelikhan August 15, 2026 19:22
@pelikhan
pelikhan marked this pull request as ready for review August 15, 2026 19:23
Copilot AI balanced review requested due to automatic review settings August 15, 2026 19:23
@pelikhan
pelikhan merged commit 0a95e75 into main Aug 15, 2026
1 check passed
@pelikhan
pelikhan deleted the copilot/add-regexpdynamicpattern-linter branch August 15, 2026 19:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enforces the existing regexpdynamicpattern analyzer in CI.

Changes:

  • Enables the analyzer for native and WASM custom-linter runs.
  • Retains production-only analysis via -test=false.
Show a summary per file
File Description
.github/workflows/cgo.yml Adds -regexpdynamicpattern to both enforced linter configurations.

Review details

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.0

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.

regexpdynamicpattern: zero-violation, type-resolved linter ready for CI enforcement — missing from LINTER_FLAGS

3 participants