ShtukbaseStandard
package page→ /norms/code.md

pages/norms/code.md

23 lines, 1.2 KB. As a page.

  1. ---
  2. type: Page
  3. title: "Code norms: what to read"
  4. roots: [.]
  5. languages: [ts, py, rs]
  6. tests: false
  7. exclude: [vendor, third_party, generated, fixtures, "**/*.min.js", "**/*.d.ts"]
  8. ---
  9. # Code norms: what to read
  10. 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.
  11. | Key | Default | What it means |
  12. |---|---|---|
  13. | `roots` | `[.]` | folders with code, from the project root |
  14. | `languages` | `[ts, py, rs]` | languages: `ts` is TypeScript and JavaScript, `py` is Python, `rs` is Rust |
  15. | `tests` | `false` | whether to read test files (`test/`, `tests/`, `*.test.ts`, `test_*.py`, `*_tests.rs`); `#[cfg(test)]` modules in Rust are never read |
  16. | `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 |
  17. Hidden folders and `node_modules`, `target`, `dist`, `build`, `__pycache__`, `.venv`, `venv` are always skipped.
  18. 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.