Skip to content

Commit

Permalink
Merge pull request #950 from hacspec/add-check-unimlemented-issue-coh…
Browse files Browse the repository at this point in the history
…erency

feat(nix/utils): intro. `check-unimlemented-issue-coherency`
  • Loading branch information
maximebuyse authored Oct 2, 2024
2 parents f466ae6 + 5cc1d60 commit a5b77cf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@
${pkgs.python3}/bin/python -m http.server "$@"
''}";
};
# Check the coherency between issues labeled
# `marked-unimplemented` on GitHub and issues mentionned in
# the engine in the `Unimplemented {issue_id: ...}` errors.
check-unimlemented-issue-coherency = {
type = "app";
program = "${pkgs.writeScript "check-unimlemented-issue-coherency" ''
RG=${pkgs.ripgrep}/bin/rg
SD=${pkgs.sd}/bin/sd
diff -U0 \
<(${pkgs.gh}/bin/gh issue -R hacspec/hax list --label 'marked-unimplemented' --json number,closed -L 200 \
| ${pkgs.jq}/bin/jq '.[] | select(.closed | not) | .number' | sort -u) \
<($RG 'issue_id:(\d+)' -Ior '$1' | sort -u) \
| $RG '^[+-]\d' \
| $SD '[-](\d+)' '#$1\t is labeled `marked-unimplemented`, but was not found in the code' \
| $SD '[+](\d+)' '#$1\t is *not* labeled `marked-unimplemented` or is closed'
''}";
};
serve-book = {
type = "app";
program = "${pkgs.writeScript "serve-book" ''
Expand Down

0 comments on commit a5b77cf

Please sign in to comment.