Skip to content

Enforce appendoneelement, timenowsub, and stringsjoinone linters in CI#47970

Merged
pelikhan merged 2 commits into
mainfrom
copilot/enforce-readiness-clean-autofix-linters
Jul 25, 2026
Merged

Enforce appendoneelement, timenowsub, and stringsjoinone linters in CI#47970
pelikhan merged 2 commits into
mainfrom
copilot/enforce-readiness-clean-autofix-linters

Conversation

Copilot AI commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Three registered analyzers — appendoneelement, timenowsub, stringsjoinone — were advisory-only despite being fully type-resolved, autofix-verified, and having zero production violations. Without enforcement, regressions could merge silently.

Changes

  • .github/workflows/cgo.yml: Added -appendoneelement -timenowsub -stringsjoinone to LINTER_FLAGS in both the default build (line 1227) and GOOS=js GOARCH=wasm build (line 1230).
- LINTER_FLAGS="... -mapclearloop -mapdeletecheck -sprintfbool -test=false"
+ LINTER_FLAGS="... -mapclearloop -mapdeletecheck -sprintfbool -appendoneelement -timenowsub -stringsjoinone -test=false"

These analyzers catch:

  • appendoneelement: append(s, []T{x}...)append(s, x)
  • timenowsub: time.Now().Sub(t)time.Since(t)
  • stringsjoinone: strings.Join([]string{s}, sep)s

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Enforce readiness for three clean autofix linters Enforce appendoneelement, timenowsub, and stringsjoinone linters in CI Jul 25, 2026
Copilot AI requested a review from pelikhan July 25, 2026 09:52
@pelikhan
pelikhan marked this pull request as ready for review July 25, 2026 09:54
Copilot AI review requested due to automatic review settings July 25, 2026 09:54
@pelikhan
pelikhan merged commit ba18d8b into main Jul 25, 2026
@pelikhan
pelikhan deleted the copilot/enforce-readiness-clean-autofix-linters branch July 25, 2026 09:54

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 three existing custom Go analyzers in CI to prevent regressions in production code.

Changes:

  • Enables appendoneelement, timenowsub, and stringsjoinone.
  • Applies enforcement to default and WebAssembly builds.
Show a summary per file
File Description
.github/workflows/cgo.yml Adds the three analyzer flags to both custom-linter CI invocations.

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: 0
  • Review effort level: Medium

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.83.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

3 participants