Lint rules
rqtk lint reports these findings. Codes are stable: a code keeps its meaning and is never reused. rqtk explain <code> prints the same information.
| Code | Severity | Checks | How to fix |
|---|---|---|---|
| RQ001 | error | requirement ID does not match the ID pattern | Rename the ID (and file) to <prefix>-<CATEGORY>-<NUMBER>, as rqtk add does, or set identification.id_pattern in .rqtk/config.toml to accept it. |
| RQ002 | error | unknown category | Use a key from [categories] in .rqtk/config.toml, or add the category there. |
| RQ003 | error | unknown requirement type | Use a value from types.allowed, or add the type there. |
| RQ004 | error | invalid lifecycle state | Use a value from lifecycle.states. |
| RQ005 | error | invalid priority | Use a value from priority.levels. |
| RQ006 | error | invalid criticality | Use a value from criticality.levels, or remove criticality. |
| RQ007 | error | rationale is required but missing | Add rationale = "…" explaining why the requirement exists. |
| RQ008 | error | verification method is required but missing | Set verification.method to a value from verification.methods. |
| RQ009 | error | invalid verification method | Use a value from verification.methods. |
| RQ010 | error | statement is not exactly one sentence with a shall keyword | Rewrite statement as one sentence using a keyword from validation.shall_keywords; split compound requirements. |
| RQ011 | error | statement uses a forbidden keyword | Replace the vague word with a measurable criterion. |
| RQ012 | error | category requires at least one parent | Add the requirement it decomposes to trace.parents. |
| RQ013 | error | TBD is not allowed by project policy | Resolve the open item and set tbd = false. |
| RQ014 | error | TBR is not allowed by project policy | Resolve the open item and set tbr = false. |
| RQ015 | error | unknown parent reference | Correct the ID in trace.parents or create the parent requirement. |
| RQ016 | error | unknown depends_on reference | Correct the ID in trace.depends_on. |
| RQ017 | error | requirement is part of a traceability cycle | Remove one of the parents/depends_on/derived_from/refines links named in the message. |
| RQ018 | warning | orphan requirement has no path to a root category | Add a trace.parents chain that reaches a category with is_root = true. |
| RQ019 | error | repository is missing a required directory | Create the directory, or remove it from repository.required_dirs. |
| RQ020 | error | repository is missing a required file | Create the file, or remove it from repository.required_files. |
| RQ021 | warning | content hash is stale | Run rqtk rehash. |
| RQ022 | error | trace.satisfies references an unknown need | Correct the need ID or create it with rqtk add-need. |
| RQ023 | error | reference to an unknown stakeholder | Correct the stakeholder ID or create it with rqtk add-stakeholder. |
| RQ024 | error | invalid verification level | Use a value from verification.levels. |
| RQ025 | error | invalid verification phase | Use a value from verification.phases. |
| RQ026 | error | unknown derived_from / refines / conflicts_with / related reference | Correct the ID in the named trace field. |
| RQ027 | error | verification activity ID is defined more than once | Give each [[verification.activities]] entry a unique id. |
| RQ028 | error | verifies annotation names an unknown verification activity | Correct the activity ID in the annotation, or add the activity to a requirement. |
| RQ029 | warning | hand-written status on an activity whose status comes from tests | Remove status (and executed_at) from the activity; run tests and rqtk verify instead. |
| RQ030 | error | verifies annotation is not followed by a test rqtk recognises | Place the annotation directly above the test, with only comments and attributes in between. For one case of a table-driven test, tag its row: // rqtk: verifies VA-… case "name". rqtk scan shows what each annotation is attached to. |
| RQ031 | warning | an activity’s evidence file does not exist | Correct the path (relative to the repository root), add the file, or link to it with a URL. |
| RQ100 | error | file could not be read or parsed (syntax error, unknown or missing field) | Fix the TOML at the reported line; rqtk schema <kind> lists the allowed fields. |
| RQ101 | error | ID is defined in more than one file | Give one of the items a new ID and rename its file to match. |
| RQ102 | error | file name does not match the ID it contains | Rename the file to <ID>.toml. |