rqm list
rqm list
rqm list prints the requirements of the project, one per line, in the order of their numbers.
rqm list [--kind <name>]... [--status <word>]...
$ rqm list
ID KIND STATUS PRIORITY TITLE
RQM-1 functional approved must Users can sign in
RQM-2 functional approved must Sessions expire
RQM-3 constraint approved should Passwords are never logged
RQM-4 functional draft may Sign-in attempts are rate limited
4 of 4 requirements shown
The priority is the resolved one. RQM-2 writes no priority, and takes must from its parent RQM-1. RQM-3 takes the default of the project, should. Parents and inheritance explains how.
Filters
--kind and --status keep only the requirements that match. Each can be repeated: a requirement matches a flag when it has any of the values given for it, and it must match every flag that was given.
$ rqm list --status approved --kind functional
ID KIND STATUS PRIORITY TITLE
RQM-1 functional approved must Users can sign in
RQM-2 functional approved must Sessions expire
2 of 4 requirements shown
$ rqm list --status draft --status rejected
ID KIND STATUS PRIORITY TITLE
RQM-4 functional draft may Sign-in attempts are rate limited
1 of 4 requirements shown
A kind or a status that does not exist is an error, not an empty list, so a typo cannot look like “nothing found”:
$ rqm list --status aproved
error[E-USAGE]: --status aproved: not a status (one of: draft, approved, required, deprecated, rejected)
[exit 2]
list shows the requirements that could be read. If a file has an error, the list is shorter than the project, the diagnostics say which file and why, and the exit code is 2. rqm check is the command for finding all such problems.
Options
$ rqm list --help
List the requirements of the project
Usage: rqm list [OPTIONS]
Options:
--format <FORMAT> Output format. JSON is the stable contract [default: human] [possible values: human, json]
--kind <KIND> Show only requirements of this kind. Repeat the flag to allow several kinds
--status <STATUS> Show only requirements with this status. Repeat the flag to allow several statuses
--strict Treat warnings as errors for the exit code. The output itself does not change
-h, --help Print help
The data of --format json is described in The JSON output.