Skip to content

[lint-monster] Process-environment coupling cleanup (2026-07-07) #43922

Description

@github-actions

Summary

Custom lint scan found 35 process-environment coupling findings from make golint-custom.

These findings are all variants of reading process environment directly from library code (os.Getenv / os.LookupEnv) instead of accepting configuration explicitly.

Affected paths

  • pkg/workflow/process_env_lookup.go
  • pkg/cli/add_interactive_orchestrator.go
  • pkg/cli/add_interactive_workflow.go
  • pkg/cli/add_wizard_command.go
  • pkg/cli/ci.go
  • pkg/cli/codespace.go
  • pkg/cli/compile_orchestrator.go
  • pkg/cli/compile_update_check.go
  • pkg/cli/engine_secrets.go
  • pkg/cli/import_url_fetcher.go
  • pkg/cli/init.go
  • pkg/cli/interactive.go
  • pkg/cli/logs_command.go
  • pkg/cli/mcp_repository.go
  • pkg/cli/mcp_server_command.go
  • pkg/cli/mcp_tools_privileged.go
  • pkg/cli/mcp_validation.go
  • pkg/cli/secret_set_command.go
  • pkg/cli/secrets.go
  • pkg/cli/shell_completion.go
  • pkg/cli/update_check.go

Representative diagnostics

  • pkg/workflow/process_env_lookup.go:8: os.LookupEnv couples the library to the process environment
  • pkg/cli/add_interactive_orchestrator.go:72: os.Getenv couples the library to the process environment
  • pkg/cli/logs_command.go:455: os.Getenv couples the library to the process environment

Expected outcome

Replace direct environment reads in library code with explicit configuration plumbing or well-contained entrypoint adapters, without broad redesign.

Remediation checklist

  • Work only on this root-cause group; do not mix in unrelated lints.
  • Prefer minimal, targeted code edits and keep behavior unchanged.
  • Thread configuration through existing structs/parameters where practical rather than introducing global state.
  • Update tests only when the changed code paths require it.
  • Validate with make golint-custom.

Suggested slices

  • interactive/add-wizard related files
  • CLI command env plumbing (logs_command.go, update_check.go, ci.go)
  • workflow-side helper process_env_lookup.go

Fused guidance: keep remediation scoped to the assigned lint group, prefer minimal targeted edits, and validate with make golint-custom.

Generated by 🧌 LintMonster · 39.2 AIC · ⌖ 6.94 AIC · ⊞ 4.4K · ◷

  • expires on Jul 13, 2026, 7:51 PM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions