Summary
Custom linter detected 120 instances of hardcoded file paths across 55 unique files.
Issue
File paths are hardcoded as string literals throughout the codebase. These should be extracted as named constants to:
- Reduce duplication and maintenance risk
- Enable centralized path configuration
- Improve readability and discoverability
Finding Examples
pkg/constants/constants.go:374: hard-coded file path ".github/workflows": consider extracting as a named constant
pkg/workflow/compiler_yaml_main_job.go:611: hard-coded file path "/tmp/gh-aw/agent/": consider extracting as a named constant
pkg/cli/add_package_manifest.go:33: hard-coded file path ".github/workflows": consider extracting as a named constant
Most Common Paths
.github/ (22 instances) – repository workflow definitions
/tmp/gh-aw/ (13 instances) – temporary runtime directories
.github/workflows/ (11 instances) – workflow files
/tmp/gh-aw/aw-prompts/prompt.txt (9 instances)
${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json (4 instances)
Affected Subsystems
- pkg/constants/ – centralized constants definition
- pkg/workflow/ (30+ files) – workflow compilation and execution
- pkg/cli/ (15 files) – CLI commands
- pkg/parser/ (10 files) – workflow parsing
Remediation Steps
- Add missing path constants to
pkg/constants/constants.go
- Replace hardcoded string literals with constant references
- Group related paths into a logical constants file section
- Run
make golint-custom to validate
Acceptance Criteria
- All 120 hardcoded path instances remediated
- New constants documented with clear purpose
- No string literals for paths remain
Generated by 🧌 LintMonster · ◷
Summary
Custom linter detected 120 instances of hardcoded file paths across 55 unique files.
Issue
File paths are hardcoded as string literals throughout the codebase. These should be extracted as named constants to:
Finding Examples
Most Common Paths
.github/(22 instances) – repository workflow definitions/tmp/gh-aw/(13 instances) – temporary runtime directories.github/workflows/(11 instances) – workflow files/tmp/gh-aw/aw-prompts/prompt.txt(9 instances)${RUNNER_TEMP}/gh-aw/mcp-config/mcp-servers.json(4 instances)Affected Subsystems
Remediation Steps
pkg/constants/constants.gomake golint-customto validateAcceptance Criteria