Skip to content

CI: enforce regexpcompileinfunction and fprintlnsprintf in custom linter gate#35690

Merged
pelikhan merged 2 commits into
mainfrom
copilot/sergo-enforce-regexpcompileinfunction-fprintlnspri
May 29, 2026
Merged

CI: enforce regexpcompileinfunction and fprintlnsprintf in custom linter gate#35690
pelikhan merged 2 commits into
mainfrom
copilot/sergo-enforce-regexpcompileinfunction-fprintlnspri

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

Sergo R22 identified two registered custom analyzers that were not included in CI’s enforced LINTER_FLAGS, despite having zero production diagnostics. This PR aligns CI enforcement with the analyzer set already maintained in cmd/linters/main.go to prevent future regressions.

  • What changed

    • Updated .github/workflows/cgo.yml (Run custom linters) to include:
      • -regexpcompileinfunction
      • -fprintlnsprintf
  • Impact

    • CI now fails on newly introduced:
      • in-function compile-time-constant regex compilation
      • fmt.Fprintln(w, fmt.Sprintf(...)) patterns
    • Existing analyzer coverage remains unchanged; this extends the explicit enforced set.
  • Workflow diff

    - run: make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -test=false"
    + run: make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -regexpcompileinfunction -fprintlnsprintf -test=false"

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Enforce regexpcompileinfunction and fprintlnsprintf analyzers in CI CI: enforce regexpcompileinfunction and fprintlnsprintf in custom linter gate May 29, 2026
Copilot AI requested a review from gh-aw-bot May 29, 2026 12:23
@pelikhan pelikhan marked this pull request as ready for review May 29, 2026 14:02
Copilot AI review requested due to automatic review settings May 29, 2026 14:02
@pelikhan pelikhan merged commit e8f2ec4 into main May 29, 2026
@pelikhan pelikhan deleted the copilot/sergo-enforce-regexpcompileinfunction-fprintlnspri branch May 29, 2026 14:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CI’s custom-linter gate to explicitly enforce two already-registered custom Go analyzers (regexpcompileinfunction and fprintlnsprintf), aligning the workflow with the analyzer set maintained in cmd/linters/main.go.

Changes:

  • Extend the make golint-custom LINTER_FLAGS in .github/workflows/cgo.yml to include -regexpcompileinfunction.
  • Extend the same enforced set to include -fprintlnsprintf.
Show a summary per file
File Description
.github/workflows/cgo.yml Adds two custom analyzer flags to the CI “Run custom linters” step so the CI gate matches the maintained analyzer set.

Copilot's findings

Tip

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

  • Files reviewed: 1/1 changed files
  • Comments generated: 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.

[sergo] Enforce regexpcompileinfunction + fprintlnsprintf analyzers in CI (zero prod violations, #aw_sg22a1)

4 participants