Skip to content

enforce: add contextcancelnotdeferred and wgdonenotdeferred to CI linter gates - #49755

Merged
pelikhan merged 2 commits into
mainfrom
copilot/enforce-readiness-contextcancelnotdeferred
Aug 2, 2026
Merged

enforce: add contextcancelnotdeferred and wgdonenotdeferred to CI linter gates#49755
pelikhan merged 2 commits into
mainfrom
copilot/enforce-readiness-contextcancelnotdeferred

Conversation

Copilot AI commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Two audited custom analyzers were registered in pkg/linters but excluded from CI enforcement. Both have zero production violations under the current tree and are safe to gate on.

Changes

  • Production gate (cgo.yml line 1362): add -contextcancelnotdeferred -wgdonenotdeferred to LINTER_FLAGS
  • Wasm gate (cgo.yml line 1365): add -wgdonenotdeferred to LINTER_FLAGSpkg/console (in scope for this gate) contains a sync.WaitGroup.Done() site; -contextcancelnotdeferred omitted since its relevant packages (pkg/cli, pkg/workflow, pkg/modelsdev) are outside the wasm gate's LINTER_PACKAGES

Brings enforced analyzer count from 33 → 35.

…ter flags

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Enforce readiness for contextcancelnotdeferred and wgdonenotdeferred analyzers enforce: add contextcancelnotdeferred and wgdonenotdeferred to CI linter gates Aug 2, 2026
Copilot AI requested a review from pelikhan August 2, 2026 10:50
@pelikhan
pelikhan marked this pull request as ready for review August 2, 2026 10:50
Copilot AI review requested due to automatic review settings August 2, 2026 10:50
@pelikhan
pelikhan merged commit 16990ec into main Aug 2, 2026
@pelikhan
pelikhan deleted the copilot/enforce-readiness-contextcancelnotdeferred branch August 2, 2026 10:51

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 two existing custom analyzers in CI.

Changes:

  • Enables both analyzers for production linting.
  • Enables wgdonenotdeferred for wasm linting.
Show a summary per file
File Description
.github/workflows/cgo.yml Extends custom-linter CI flags.

Review details

Tip

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

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

Comment thread .github/workflows/cgo.yml

- name: Run custom linters (wasm)
run: GOOS=js GOARCH=wasm make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -logfatallibrary -regexpcompileinfunction -fprintlnsprintf -strconvparseignorederror -jsonmarshalignoredeerror -uncheckedtypeassertion -fmterrorfnoverbs -tolowerequalfold -httpnoctx -timeafterleak -errortypeassertion -execcommandwithoutcontext -sprintfint -stringsindexcontains -stringscountcontains -bytesbufferstring -ioutildeprecated -mapclearloop -mapdeletecheck -sprintfbool -appendoneelement -timenowsub -stringsjoinone -writebytestring -lenstringsplit -stringreplaceminusone -osgetenvlibrary -ossetenvlibrary -stringsindexhasprefix -test=false" LINTER_PACKAGES="./pkg/console ./pkg/parser ./pkg/styles ./pkg/tty ./pkg/workflow"
run: GOOS=js GOARCH=wasm make golint-custom LINTER_FLAGS="-errstringmatch -panicinlibrarycode -manualmutexunlock -osexitinlibrary -rawloginlib -logfatallibrary -regexpcompileinfunction -fprintlnsprintf -strconvparseignorederror -jsonmarshalignoredeerror -uncheckedtypeassertion -fmterrorfnoverbs -tolowerequalfold -httpnoctx -timeafterleak -errortypeassertion -execcommandwithoutcontext -sprintfint -stringsindexcontains -stringscountcontains -bytesbufferstring -ioutildeprecated -mapclearloop -mapdeletecheck -sprintfbool -appendoneelement -timenowsub -stringsjoinone -writebytestring -lenstringsplit -stringreplaceminusone -osgetenvlibrary -ossetenvlibrary -stringsindexhasprefix -wgdonenotdeferred -test=false" LINTER_PACKAGES="./pkg/console ./pkg/parser ./pkg/styles ./pkg/tty ./pkg/workflow"
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.3

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.

Enforce-readiness: contextcancelnotdeferred + wgdonenotdeferred are clean, type/AST-resolved, zero production violations

3 participants