package page→ /norms/code.md
pages/norms/code.md
23 lines, 1.2 KB. As a page.
- ---
- type: Page
- title: "Code norms: what to read"
- roots: [.]
- languages: [ts, py, rs]
- tests: false
- exclude: [vendor, third_party, generated, fixtures, "**/*.min.js", "**/*.d.ts"]
- ---
- # Code norms: what to read
- Shared settings for the code-norm packages (`code-refactoring`, `code-deep-modules`, `code-pragmatic`, `code-unix`, `code-functional-core`). Their checks read the project's code according to this page.
- | Key | Default | What it means |
- |---|---|---|
- | `roots` | `[.]` | folders with code, from the project root |
- | `languages` | `[ts, py, rs]` | languages: `ts` is TypeScript and JavaScript, `py` is Python, `rs` is Rust |
- | `tests` | `false` | whether to read test files (`test/`, `tests/`, `*.test.ts`, `test_*.py`, `*_tests.rs`); `#[cfg(test)]` modules in Rust are never read |
- | `exclude` | see the header | path masks that no one reads: `**` is any folders, `*` is part of a name, a bare name is a folder or file with that name anywhere |
- Hidden folders and `node_modules`, `target`, `dist`, `build`, `__pycache__`, `.venv`, `venv` are always skipped.
- Each package's thresholds are on its page in [/norms/code/](/norms/code/). One place in the code is released by the comment `code-allow: <check name>` on its line or the line above.