I want to filter the results generated by infer.
For the purpose I use the command infer report.
In the documentation there are allow and block options, to whitelist/blacklist findings based on the source file location:
--report-allow-list-path-regex +path_regex
Report issues only on files whose relative path matches the
specified OCaml regex (and which do not match
--report-block-list-path-regex)
--report-block-list-files-containing +string
Do not report any issues on files containing the specified string
--report-block-list-path-regex +path_regex
Do not report any issues on files whose relative path matches the
specified OCaml regex, even if they match the allow list specified
by --report-allow-list-path-regex
From the documentation I understand, that first the allow list is processed and then the block list.
Meaning, when allowing src/, only findings within src/ directory should be listed.
To exclude src/test I could use the block option.
Unfortunately, I could not reproduce this behavior.
The following command yields all findings:
I want to filter the results generated by infer. For the purpose I use the command
infer report
. In the documentation there areallow
andblock
options, to whitelist/blacklist findings based on the source file location:From the documentation I understand, that first the
allow
list is processed and then theblock
list. Meaning, when allowingsrc/
, only findings withinsrc/
directory should be listed. To excludesrc/test
I could use theblock
option.Unfortunately, I could not reproduce this behavior. The following command yields all findings:
The following command works as expected and excludes all findings from the report:
It turns out, that in the actual implementation, the
allow
list is processed somehow after theblock
list. So this works:Is this the intended functionality of the
block
/allow
option?Infer version:
Build system: Linux