For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test file rules

Classify changed files as code or test so you can track code and test changes separately in pull request metrics

In pull request settings, you can define gitignore-style rules that classify changed files as test files. Files that do not match are classified as code.

Use test file rules when you want separate metrics for code changes and test changes — for example, to see how much production code changed compared to test updates in a pull request.

Test file rules settings

How rules work

  • One pattern per line

  • Paths are relative to the repository root

  • Test file rules do not exclude files from pull request size calculations — use file exclusion rules for that

Default patterns

New organizations start with common test file patterns, such as *.test.ts, __tests__/**, and *_test.go. You can edit these rules to match how your repositories name test files.

After you save

When you update test file rules, Swarmia recalculates file classifications for your pull requests. This may take a while for large organizations.

Last updated

Was this helpful?