Skip to content

Fix Go linting errors - unused append results and test assertion pattern#16193

Merged
pelikhan merged 3 commits intomainfrom
copilot/lint-go-code-yet-again
Feb 16, 2026
Merged

Fix Go linting errors - unused append results and test assertion pattern#16193
pelikhan merged 3 commits intomainfrom
copilot/lint-go-code-yet-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

CI linting was failing with 3 errors: 2 staticcheck violations (SA4010) and 1 testifylint violation.

Changes

pkg/cli/compile_orchestration.go

  • Removed unused errorMessages variable and associated append operations
  • Error tracking already handled via ValidationResult.Errors and trackWorkflowFailure()

pkg/stringutil/pat_validation_test.go

  • Changed assert.Error() to require.Error() for critical error assertions
  • Added missing require import
// Before
assert.Error(t, err, "should return error for invalid token")

// After  
require.Error(t, err, "should return error for invalid token")

The unused errorMessages slice was being appended to but never read - the local variable declaration shadowed any potential return value without assignment.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/pkg/tool/linux_amd64/compile GOINSECURE (http block)
    • Triggering command: /usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/pkg/tool/linu-lang=go1.24 GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu-goversion (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha vrXP/jO9j2u5wg3AJYV_tvrXP ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet /home/REDACTED/work/_temp/ghcca-node/node/bin/bash se 555567/b043/vet.rev-parse .cfg 088394/b398/importcfg --no�� 088394/b398/embedcfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet ent.js 555567/b186/vet.rev-parse r: $owner, name:--show-toplevel ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v2
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v2 --jq .object.sha -json cfg e GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu-f ode_�� -json GO111MODULE ache/go/1.25.0/x-f GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xconfig (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v2 --jq .object.sha -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurev-parse ode_�� -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xconfig (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683
    • Triggering command: `/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha -json ults and use require.Error

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>-1 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurev-parse env -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet` (http block)

  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha /home/REDACTED/work/gh-aw/gh-aw/.github/workflows rev-parse /usr/bin/infocmp -json GO111MODULE 64/pkg/tool/linu--show-toplevel infocmp -1 k/gh-aw/gh-aw/.github/workflows 64/pkg/tool/linux_amd64/vet ash l cfg 64/pkg/tool/linu--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha 088394/b389/gitutil.test rev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha graphql -f /usr/bin/git -f owner=github -f git -C runs/20260216-194016-20667/test-1862077430 config /usr/local/bin/bash remote.origin.urgit 555567/b017/vet.rev-parse node bash (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha 64/bin/go resolved$ /usr/bin/git with-tools.md /tmp/go-build338rev-parse p/bin/bash git conf�� user.name Test User /usr/bin/git ithub/workflows rev-parse repository(owne--show-toplevel git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha k/gh-aw/gh-aw/.github/workflows x_amd64/vet /usr/bin/infocmp l GO111MODULE x_amd64/vet infocmp -1 fixer.lock.yml x_amd64/vet 64/pkg/tool/linux_amd64/vet l GO111MODULE x_amd64/vet 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -bool -buildtags /usr/bin/git -errorsas -ifaceassert -nilfunc git rev-�� --show-toplevel -tests /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha --show-toplevel /opt/hostedtoolc-goversion /usr/bin/git ithub/workflows -buildtags /usr/bin/git git rev-�� tup/sh/sanitize_path.sh&#39; &#39;:::/usr/bin:/usr/local/bin&#39; &amp;&amp; echo &#34;$PATH&#34; git /usr/bin/infocmp --show-toplevel -tests /home/REDACTED/.lo--show-toplevel infocmp (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha d -n 10 cfg /node GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurev-parse ode_�� -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x-f (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v7
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE _value&#34;].&#34;\n&#34;; GOMODCACHE ache/go/1.25.0/x-f (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha WEgk/t3G_g0Z8AKEGOSUMDB format:pkg-json 64/bin/go tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha l5jb/gOKs9ZYgomgGOSUMDB (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha prettier --write 64/bin/go !../../../pkg/wobash --ignore-path ../../../.pretti--noprofile gzip -d (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha -json GO111MODULE e_modules/node_modules/.bin/sh GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x-f (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha SameOutput2586002588/001/stability-test.md rev-parse /usr/bin/gh -json GO111MODULE $name) { has--show-toplevel gh api runs/20260216-194016-20667/test-748600401 --jq 0/x64/bin/node se 555567/b011/vet.rev-parse r: $owner, name:--show-toplevel bash (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha 879073529/.github/workflows cfg $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linu-f env -json cfg 64/pkg/tool/linu-f GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha 1229615653/.github/workflows cfg $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurev-parse env -json cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurev-parse (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE tion instructio env -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha /home/REDACTED/work/gh-aw/gh-aw/.github/workflows rev-parse /usr/bin/git -json .cfg $name) { has--show-toplevel git -C /home/REDACTED/work/gh-aw/gh-aw/.github/workflows rev-parse /home/REDACTED/.local/bin/bash 3808-17299/test-git 555567/b013/vet.rev-parse ache/go/1.25.0/x--show-toplevel bash (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha -json GO111MODULE x_amd64/compile GOINSECURE GOMOD GOMODCACHE x_amd64/compile env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha -json GO111MODULE cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x-f (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linuc12cf5cbfa9fb77c952021c02a6bd4d46906a39f GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
  • https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x-f (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE cfg GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
  • https://api.github.com/repos/docker/login-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha -json .cfg ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x-f (http block)
  • https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x-f (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x-f (http block)
  • https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha -json .cfg x_amd64/asm GOINSECURE GOMOD GOMODCACHE x_amd64/asm (http block)
    • Triggering command: /usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha -json GO111MODULE r: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/xrev-parse (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 bash x_amd64/compile --noprofile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 pkg/mod/github.com/rhysd/actionl-ifaceassert (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 bash /opt/hostedtoolcache/go/1.25.0/x-nilfunc --noprofile (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 go /opt/hostedtoolcache/go/1.25.0/x-buildmode=exe l (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 make x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 /bin/sh x_amd64/link GOPATH=$(go env git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 go x_amd64/link GOPATH (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path -json GO111MODULE repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -uns�� -unreachable=false /tmp/go-build597555567/b021/vet.cfg pilot-client/node_modules/@esbuild/linux-x64/bin/esbuild GOSUMDB GOWORK 64/bin/go pilot-client/node_modules/@esbuild/linux-x64/binconfig (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/xrev-parse -ato�� -bool -buildtags k/gh-aw/gh-aw/actions/setup/js/node_modules/node_modules/.bin/sh -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linurev-parse (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 --no-progress REDACTED sh stlo�� node install.js go /opt/hostedtoolcache/node/24.13.0/x64/bin/node -json GO111MODULE 64/bin/go FyPOPt7/hAqieucyA4npJ9bo6g4b (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/c4e091835c7a94dc7d3acb8ed3ae145afb4995f3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/c4e091835c7a94dc7d3acb8ed3ae145afb4995f3 --jq .object.sha -json GO111MODULE 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env 2147726955 cfg 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha k/gh-aw/gh-aw/.github/workflows go (http block)
  • https://api.github.com/repos/githubnext/agentics/git/ref/tags/-
    • Triggering command: `/usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/- --jq .object.sha -json cfg $name) {
      hasDiscussionsEnabled
      }
      } GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linux_amd64/vet env -json ults and use require.Error

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>-C 64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE 64/pkg/tool/linurev-parse` (http block)

  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion /tmp/go-build315git -trimpath 64/bin/go git desc�� n/git/ref/tags/v3 --always /opt/hostedtoolcache/node/24.13.0/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/nxterm-color l GO111MODULE x_amd64/vet node (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo /opt/hostedtoolc-f GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolc-f -uns�� -unreachable=fal-f /tmp/go-build597owner=github it GOSUMDB GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x--jq (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo de/node/bin/bash GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcconfig -uns�� runs/20260216-19remote.origin.url /tmp/go-build597555567/b010/vet.cfg bin/git l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linuconfig (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/asm -m -json (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -json GO111MODULE /opt/hostedtoolc-f GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolc-f -uns�� successfully&#34; /tmp/go-build597owner=github sh l GOWORK 64/bin/go /opt/hostedtoolcache/go/1.25.0/x--jq (http block)
  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE /sh GOINSECURE GOMOD GOMODCACHE x_amd64/link env -json GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login -json GO111MODULE ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE ns-lock.json doerev-parse env -json GO111MODULE de/node/bin/sh GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcrev-parse (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Reference: https://github.com/github/gh-aw/actions/runs/22075082632/job/63788329557#step:7:1

Lint go


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 16, 2026 19:38
…Error

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add linters for Go code Fix Go linting errors - unused append results and test assertion pattern Feb 16, 2026
Copilot AI requested a review from pelikhan February 16, 2026 19:42
@pelikhan pelikhan marked this pull request as ready for review February 16, 2026 19:43
Copilot AI review requested due to automatic review settings February 16, 2026 19:43
@pelikhan pelikhan merged commit 0ee5f37 into main Feb 16, 2026
2 checks passed
@pelikhan pelikhan deleted the copilot/lint-go-code-yet-again branch February 16, 2026 19:44
Copy link
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

This PR fixes Go linting errors identified by CI: two staticcheck SA4010 violations (unused append results) and one testifylint violation (incorrect test assertion pattern).

Changes:

  • Removed unused errorMessages variable and appends in pkg/cli/compile_orchestration.go - error tracking is already handled via ValidationResult.Errors and trackWorkflowFailure()
  • Changed assert.Error() to require.Error() in pkg/stringutil/pat_validation_test.go to comply with testifylint requirements
  • Updated 18 workflow lock files to include GITHUB_SERVER_URL environment variable in repo-memory steps - these are auto-generated changes from the workflow compiler

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

File Description
pkg/cli/compile_orchestration.go Removed unused errorMessages variable that was being appended to but never read
pkg/stringutil/pat_validation_test.go Fixed testifylint violation by using require.Error() instead of assert.Error() for critical error assertions
.github/workflows/*.lock.yml (18 files) Auto-generated: Added GITHUB_SERVER_URL: ${{ github.server_url }} to repo-memory clone and push steps for GitHub Enterprise support

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

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