diff options
| author | 2023-12-15 12:29:52 +0100 | |
|---|---|---|
| committer | 2023-12-15 17:30:48 +0100 | |
| commit | 517ac4801b6476c26e87ed8943d01f57ae4e75f6 (patch) | |
| tree | ae033f1251a84db90d0844fdbf00044a2bf1e2dc /tools/aconfig/src/codegen/java.rs | |
| parent | 49e4d6e73dc00a383cfbe1a0048b26f7575211ea (diff) | |
aconfig: dump --filter: implement predicates
The aconfig dump command can now limit which flags to print by passing
in one or more --filter=<query> commands.
If multiple --filter arguments are provided, flags that match any filter
will be included in the output.
The <query> syntax is <what>:<value>, where <what> is the name of a
ProtoParsedFlag field. Multiple queries can be AND-ed together by
joining them with a plus ('+') character.
Example queries:
- --filter='is_exported:true' # only show exported flags
- --filter='permission:READ_ONLY+state:ENABLED' # only show flags that are read-only and enabled
- --filter='permission:READ_ONLY' --filter='state:ENABLED' # only show flags that are read-only or enabled (or both)
Current limitations that may be addressed in future CLs:
- No support to invert a query, e.g. "flags *not* in the following
namespace"
- No support to quote strings; this makes description matching
difficult
- No support to glob strings, only exact matches are considered
- No support to filter by description, trace or metadata fields
Bug: 315487153
Test: atest aconfig.test
Test: printflags --format="{fully_qualified_name}={state}" --filter=permission:READ_ONLY # manually verify output
Change-Id: Ie1e40fa444cec429e336048439da955f30e22979
Diffstat (limited to 'tools/aconfig/src/codegen/java.rs')
0 files changed, 0 insertions, 0 deletions