Skip to content

check: C010 — flag environment variables the repo never reads #3

Description

@resuaico

AGENTS.md documents STRIPE_SECRET_KEY, the code moved to PAYMENTS_API_KEY eight months ago, and the agent keeps writing setup code against a variable nothing reads.

The check

Collect SCREAMING_SNAKE_CASE tokens from backticked spans and from .env-shaped fenced blocks in AGENTS.md. Grep the repo for each one. Flag the ones with zero occurrences outside the instructions file.

Precision notes

  • Search the whole tree (respecting .gitignore if cheap), not just source files — variables show up in docker-compose.yml, CI workflows, Dockerfile, .env.example.
  • Skip the standard environment: PATH, HOME, USER, SHELL, LANG, TZ, CI, NODE_ENV, PORT, DEBUG. Those are read by things that are not this repo.
  • Require at least one underscore or a length floor. API and URL are words.
  • If the repo has no readable source files at all, say nothing.

severity = "warning".

Tests

Fires-on: a variable named in AGENTS.md and nowhere else. Stays-quiet: one that appears in docker-compose.yml, and one from the standard-environment list. See CONTRIBUTING.md.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions