Skip to content

[lint-monster] Hard-coded path constant adoption (2026-06-25) #41468

Description

@github-actions

Summary

Custom lint scan on 2026-06-25 found 22 hard-coded path findings. The dominant root cause is repeated inline repository and temp-path strings where existing constants should be used.

Current findings

Representative diagnostics:

  • pkg/workflow/opencode_engine.go:163 — use constants.AwPromptsFile instead of "/tmp/gh-aw/aw-prompts/prompt.txt"
  • pkg/cli/add_package_manifest.go — 12 findings using .github/, .github/workflows, and .github/workflows/ inline
  • pkg/cli/audit.go:1157 — use constants.GithubDir
  • pkg/cli/audit_comparison.go:516 — use constants.GithubDir
  • pkg/cli/experiments_command.go:368 — use constants.WorkflowsDirSlash
  • pkg/cli/fetch.go:125 — use constants.WorkflowsDirSlash
  • pkg/cli/firewall_policy.go:467 — use constants.AWFAuditDir
  • pkg/cli/update_command.go:365 — use constants.WorkflowsDir; consider named constants for .github/agents and .github/aw
  • pkg/cli/upgrade_org.go:104 — consider a named constant for .github/skills

Expected outcome

Replace inline path literals with the appropriate existing constant where one exists, and introduce narrowly-scoped named constants only where the linter explicitly indicates no existing constant is available.

Remediation checklist

  • Replace every reported inline path with the matching constant when available
  • For .github/agents, .github/aw, and .github/skills, extract a small named constant only if no shared constant already exists
  • Keep edits minimal and local to the reported files
  • Avoid opportunistic path cleanup outside the reported findings
  • Validate with make golint-custom

Copilot instructions

Keep this task scoped to the hard-coded-path group. Prefer the existing constants package over introducing new constants, and use new names only for the few remaining literals the linter marked as "consider extracting as a named constant".

Generated by 🧌 LintMonster · 65.3 AIC · ⊞ 4.3K ·

  • expires on Jul 2, 2026, 6:18 AM UTC-08:00

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions