-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Some Excludes apply to a specific target. We need to resolve the target before we can decide which issues to exclude. By resolving the target I mean finding all direct JSON paths that it matches.
Task
Given a target JSON path, which can include JSON path selectors like a wildcard (e.g., $.resources[*].name), and a descriptor, find all direct JSON paths in the descriptor that match the target.
One strategy could be resolving the target to a list of direct JSON paths -- these can then be compared to issue locations. This could use the same code as resolving targets for checking rules (#55).
(I couldn't find anything in python-jsonpath for checking whether a direct JSON path matches a JSON path with a selector in it. If something like that exists, it could be another way of solving this problem.)
Output
A function like resolve_target_to_location(target: str, descriptor: dict[str, Any]) -> list[str]. Probably a wrapper around the function in #55.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status