Adjust filtering to make includes stronger than excludes (#23223)

Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
J. Nick Koston 2022-06-29 04:59:40 -05:00 committed by GitHub
parent 8c6ec8af78
commit 03454381ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,20 +1,33 @@
Filters are applied as follows: Filters are applied as follows:
1. No includes or excludes - pass all entities 1. No filter
2. Includes, no excludes - only include specified entities - All entities included
3. Excludes, no includes - only exclude specified entities 2. Only includes
4. Both includes and excludes: - Entity listed in entities include: include
- Include domain and/or glob patterns specified - Otherwise, entity matches domain include: include
- If domain is included, and entity not excluded or match exclude glob pattern, accept - Otherwise, entity matches glob include: include
- If entity matches include glob pattern, and entity does not match any exclude criteria (domain, glob pattern or listed), accept - Otherwise: exclude
- If domain is not included, glob pattern does not match, and entity not included, reject 3. Only excludes
- Exclude domain and/or glob patterns specified and include does not list domains or glob patterns - Entity listed in exclude: exclude
- If domain is excluded and entity not included, reject - Otherwise, entity matches domain exclude: exclude
- If entity matches exclude glob pattern and entity not included, reject - Otherwise, entity matches glob exclude: exclude
- If entity does not match any exclude criteria (domain, glob pattern or listed), accept - Otherwise: include
- Neither include or exclude specifies domains or glob patterns 4. Domain and/or glob includes (may also have excludes)
- If entity is included, accept (as #2 above) - Entity listed in entities include: include
- If entity include and exclude, the entity exclude is ignored - Otherwise, entity listed in entities exclude: exclude
- Otherwise, entity matches glob include: include
- Otherwise, entity matches glob exclude: exclude
- Otherwise, entity matches domain include: include
- Otherwise: exclude
5. Domain and/or glob excludes (no domain and/or glob includes)
- Entity listed in entities include: include
- Otherwise, entity listed in exclude: exclude
- Otherwise, entity matches glob exclude: exclude
- Otherwise, entity matches domain exclude: exclude
- Otherwise: include
6. No Domain and/or glob includes or excludes
- Entity listed in entities include: include
- Otherwise: exclude
The following characters can be used in entity globs: The following characters can be used in entity globs: