Skip to content

Reduce immediate lint debt from custom-linter sweep#32675

Merged
pelikhan merged 3 commits into
mainfrom
copilot/run-custom-linters-and-fix-issues
May 16, 2026
Merged

Reduce immediate lint debt from custom-linter sweep#32675
pelikhan merged 3 commits into
mainfrom
copilot/run-custom-linters-and-fix-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

This PR targets the “run custom linters and fix the maximum of issues” objective by removing currently surfaced, high-signal lint violations in touched areas without broad refactors. It focuses on modernize/staticcheck/testifylint findings that were actionable in-place.

  • Go 1.25 modernize updates

    • Replaced strings.Split(..., "\n") loops with strings.SplitSeq(..., "\n") iteration in test code.
    • Updated assertion style to preferred testify patterns (e.g., assert.Empty, expected/actual ordering fixes).
  • Workflow/CLI lint cleanups

    • Replaced manual map copy loops with maps.Copy where env maps are merged.
    • Replaced unnecessary fmt.Sprintf with direct string concatenation for static path composition.
    • Simplified conditional logic in step parsing to satisfy staticcheck guidance while preserving behavior.
  • Scope and intent

    • Kept changes surgical to reduce immediate lint noise in active files, while leaving large pre-existing custom-linter backlog (e.g., oversized functions/excessive params) for dedicated follow-up refactors.
// before
for _, line := range strings.Split(result, "\n") { ... }
setupEnvVars[key] = value

// after
for line := range strings.SplitSeq(result, "\n") { ... }
maps.Copy(setupEnvVars, jobConfig.Env)

Copilot AI and others added 3 commits May 16, 2026 18:14
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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 Fix current lint violations after custom linter run Reduce immediate lint debt from custom-linter sweep May 16, 2026
Copilot AI requested a review from pelikhan May 16, 2026 18:27
@pelikhan pelikhan marked this pull request as ready for review May 16, 2026 18:31
Copilot AI review requested due to automatic review settings May 16, 2026 18:31
@github-actions github-actions Bot mentioned this pull request May 16, 2026
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

This PR reduces lint debt with small Go modernizations and updates generated workflow lock files to match current repo-memory constraint rendering.

Changes:

  • Replaced manual/env-copy and formatting patterns with maps.Copy and string concatenation.
  • Modernized tests with strings.SplitSeq, assert.Empty, and corrected expected/actual ordering.
  • Regenerated workflow lock snippets for repo-memory max patch-size text.
Show a summary per file
File Description
pkg/workflow/safe_jobs.go Simplifies safe-job env setup construction.
pkg/workflow/safe_jobs_threat_detection_test.go Modernizes line iteration in a secret-leak test.
pkg/stringutil/spec_test.go Modernizes line iteration and testify assertions.
pkg/cli/codemod_steps_run_secrets_env.go Simplifies equivalent step-key filtering logic.
pkg/cli/codemod_steps_run_secrets_env_test.go Modernizes line iteration in codemod assertions.
.github/workflows/workflow-health-manager.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/weekly-blog-post-writer.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/technical-doc-writer.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/smoke-ci.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/sergo.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/security-compliance.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/pr-triage-agent.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/metrics-collector.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/glossary-maintainer.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/firewall-escape.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/discussion-task-miner.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/developer-docs-consolidator.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/delight.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/deep-report.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/daily-testify-uber-super-expert.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/daily-sentrux-report.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/daily-news.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/daily-community-attribution.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/daily-code-metrics.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/daily-cli-performance.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/copilot-token-optimizer.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/copilot-token-audit.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/copilot-session-insights.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/copilot-pr-prompt-analysis.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/copilot-pr-nlp-analysis.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/copilot-cli-deep-research.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/copilot-agent-analysis.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/audit-workflows.lock.yml Updates generated repo-memory max patch-size text.
.github/workflows/agent-performance-analyzer.lock.yml Updates generated repo-memory max patch-size text.

Copilot's findings

Tip

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

  • Files reviewed: 35/35 changed files
  • Comments generated: 0

@github-actions
Copy link
Copy Markdown
Contributor

@copilot review all comments and address the reviewer feedback. Please post a short completion plan for any remaining blockers and rerun checks after the fixes.

Generated by 👨‍🍳 PR Sous Chef ·

@pelikhan pelikhan merged commit aba8025 into main May 16, 2026
4 checks passed
@pelikhan pelikhan deleted the copilot/run-custom-linters-and-fix-issues branch May 16, 2026 18:52
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.

3 participants