diff options
author | Lukacs T. Berki <lberki@google.com> | 2021-04-01 18:27:04 +0200 |
---|---|---|
committer | Lukacs T. Berki <lberki@google.com> | 2021-04-06 09:07:45 +0200 |
commit | 115b754dc30375882eb526042ce005b762a50874 (patch) | |
tree | cb6834721be59c2712a3fdfd28a4180a662a2a12 /json_module_graph/printModule.jq | |
parent | 5765e4c523fdcb00692f6ebfc8739616f01aba98 (diff) | |
download | bazel-115b754dc30375882eb526042ce005b762a50874.tar.gz |
Add .jq files for querying the JSON module graph.
Test: None.
Change-Id: Ia9a888d4ec4cfeb4872a16272789c84ae3114720
Diffstat (limited to 'json_module_graph/printModule.jq')
-rw-r--r-- | json_module_graph/printModule.jq | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/json_module_graph/printModule.jq b/json_module_graph/printModule.jq new file mode 100644 index 00000000..7ef4fccb --- /dev/null +++ b/json_module_graph/printModule.jq @@ -0,0 +1,13 @@ +include "library"; + +def printModule($mod): + .[] | select(.Name == $mod) | + transformModuleReferences(emptyIfNull | removeLinkVariation | removeEmptyVariations) | + depDelta(.Variations) | depDelta(.DependencyVariations) | + transformModule(flattenVariations) | + deleteDependencyVariations | + .Deps |= map(deleteDependencyVariations) | + .Deps |= groupDeps +; + +printModule($arg)
\ No newline at end of file |