Add custom grouping based on filter groups
This would allow for user-defined grouping.
A filter with or
operators naturally defines groups. For instance:
-
path co "foo" or path co "bar"
- This is two groups, one where
path co "foo"
and one wherepath co "bar"
.
- This is two groups, one where
-
extra[severity eq "ERROR" and (group eq "group::foundations" or group eq "group::source code" or group eq "group::unknown")]
- This is three groups:
extra[severity eq "ERROR" and group eq "group::foundations"]
extra[severity eq "ERROR" and group eq "group::source code"]
extra[severity eq "ERROR" and group eq "group::unknown"]
- This is three groups:
-
(check_id co "foo" or check_id co "bar") and (path ew ".haml" or path ew ".vue")
- This is four groups:
check_id co "foo" and path ew ".haml"
check_id co "foo" and path ew ".vue"
check_id co "bar" and path ew ".haml"
check_id co "bar" and path ew ".vue"
- This is four groups:
These groups are not necessarily mutually exclusive, so we'd either have it so that findings are put into the first matching group, or put into all matching groups. The former might be confusing, as it won't be clear why a finding isn't in an expected group. The latter might be confusing, as it would inflate the apparent number of findings.
Edited by Mark Florian