review classifier: tests-with-behaviour asks for tests of the logic, not of every line of glue
This commit is contained in:
parent
83b5f0bd89
commit
111cd41c4c
1 changed files with 15 additions and 8 deletions
|
|
@ -33,14 +33,21 @@ classifications:
|
|||
threshold: 75
|
||||
- name: tests-with-behaviour
|
||||
description: >-
|
||||
Every change to Rust or application code behaviour comes with a new or
|
||||
updated test that exercises it. A diff whose changed files are all test
|
||||
code (a fixture under `nix/module-eval/`, `nix/checks.nix`, a crate's
|
||||
`tests/` directory, or Rust inside `#[cfg(test)]` or a `#[test]`
|
||||
function) changes no behaviour: the question is not applicable. A NixOS
|
||||
module assertion, a Grafana/alerting rule, or the literal text of a log
|
||||
or tracing message is not held to this either. A PR that changes
|
||||
behaviour and tests together matches.
|
||||
The decision-making logic a change adds or alters in Rust or
|
||||
application code has a new or updated test that exercises it: pure
|
||||
functions, state transitions, request and response handling, parsing,
|
||||
validation. A new code path with real logic and no test does not
|
||||
match, and neither does a bug fix with no regression test. Thin glue
|
||||
needs no test of its own: UI component wiring, JSX or markup, a
|
||||
routing table, registering an event listener, re-exporting, or
|
||||
calling a function that is already tested. A diff whose changed files
|
||||
are all test code (a fixture under `nix/module-eval/`,
|
||||
`nix/checks.nix`, a crate's `tests/` directory, or Rust inside
|
||||
`#[cfg(test)]` or a `#[test]` function) changes no behaviour: the
|
||||
question is not applicable. So is a diff that changes only
|
||||
documentation. A NixOS module assertion, a Grafana/alerting rule, or
|
||||
the literal text of a log or tracing message is not held to this
|
||||
either. A PR that changes logic and tests together matches.
|
||||
polarity: positive
|
||||
threshold: 65
|
||||
- name: docs-updated
|
||||
|
|
|
|||
Loading…
Reference in a new issue