Repository hygiene · rule repo-no-tests
Data repository with no tests
A Metacenta review checks this under the rule The repo contains tests. Everything below applies whether or not you ever commission one.
What this rule checks
This rule flags a repository with no file that follows a common test convention. Anything under a tests/, test/ or spec/ folder passes. So do names like *.test.*, *.spec.*, test_*.py, *_test.py, *_test.go and conftest.py. Generic dbt tests declared in schema YAML are not files, so for a dbt project we count the tests in its manifest instead. One data or unit test is enough to pass.
Why it matters
Every change is then verified by hand, so the cost of a refactor grows with the size of the codebase. A regression surfaces when someone questions a number, not when the change is made.
How to fix it
Start a test suite on the transformations most often disputed. Add a test target, starting with the transformations most often blamed for wrong numbers. In a dbt project, singular tests live in the tests/ folder, which this rule recognises.
When it is fine to leave
A repository of scripts that are run once and thrown away can go without. For a dbt project, this rule only asks whether any test exists. The dbt rules on untested models judge how much of the project the tests cover.
What we need to check it
Read-only access to the repository's file list. For a dbt project we also need its manifest.json, because its tests live in YAML. Without the manifest we skip this rule rather than guess. We match names only, so a suite with an unusual naming convention is missed, and the finding is medium confidence. If the listing was truncated, we decline rather than report.