Skip to content

[finding] packages/qa/dogfood/tsconfig.json includes src/**/*, a directory the package does not have #10899

Description

@os-zhuang

What

packages/qa/dogfood/tsconfig.json declares:

"include": ["src/**/*", "test/**/*"]

The package has no src directory. Its whole tree is CHANGELOG.md, README.md, package.json, test/, tsconfig.json, vitest.config.ts — measured on origin/main @ 9faa9bc51d:

$ ls -d packages/qa/dogfood/src
ls: cannot access 'packages/qa/dogfood/src': No such file or directory

Impact, stated honestly: low

Nothing is broken today. test/**/* matches real files, so tsc has inputs and typecheck (tsc --noEmit) behaves correctly; a non-matching include glob is simply dropped. This is a dead config entry, not a coverage hole — worth recording, not worth interrupting anyone for.

Why it is worth a line anyway

It is the neighbouring class to #10880 (GENERATED_COVERED, PR #10896), and the two are worth keeping distinct rather than merged:

I deliberately did not widen the new invariant to cover it while implementing #10880. The detector there is "is this path gitignored", which cleanly separates "generated by design" from "names nothing"; folding this in would have meant flagging a dead glob with a message telling the author to declare a generator for it, which is the wrong remedy. It was the only instance the census turned up: of 101 include roots across the workspace, 3 are gitignored (all in apps/docs) and exactly 1 is a non-ignored root that does not exist — this one.

Possible dispositions, for triage rather than as a recommendation

  1. Delete "src/**/*" from the array — correct if the package is test-only by design.
  2. Leave it, if a src/ is expected to arrive.
  3. If it is judged worth a mechanical guard, that would be a third invariant in check-type-check-coverage.mjs ("an include root that is neither tracked nor ignored names nothing"), with the caveat that its population is currently one entry and its impact is cosmetic — the four-axis case for spending a guard on it is not obviously positive, and I am not making it here.

Found while implementing #10880; deliberately kept out of PR #10896, whose diff is one file (scripts/check-type-check-coverage.mjs). Unassigned, and not queued.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions