Created
June 16, 2020 18:17
-
-
Save fredemmott/403b05b4497d7e62eaa298c93d711c35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
.errors[].message[] | |
| select(.descr | startswith("You cannot use HH_FIXME")) | |
| ( | |
if .path | endswith(".hackpartial") | |
then { it: ., option: "allowed_fixme_codes_partial" } | |
else { it: ., option: "allowed_fixme_codes_strict" } | |
end | |
) | |
| ( | |
if .it.descr | endswith("in declarations") | |
then | |
[ | |
{ code: .it.code, option: .option }, | |
{ code: .it.code, option: "allowed_decl_fixme_codes" } | |
] | |
else [ { code: .it.code, option: .option } ] | |
end | |
) | |
] | |
| flatten | |
| group_by(.option) | |
| .[] | |
| { | |
option: .[0].option, | |
codes: map(.code) | unique | sort | |
} | |
|.option+"="+(.codes|join(",")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment