## SPDX-License-Identifier: CC0-1.0
##
## Copyright (C) 2025 Woj. Kosior <koszko@koszko.org>
// {
if (first_skipped) {
what = "???.";
}
first_skipped = 1;
}
## Ones to skip.
/ST-experiment-limitation/ {
what = 0;
}
/ST-not-a-real-package/ {
what = 0;
}
## Ones to include for plotting.
/ST-failure,FR-failed-to-checkout,/ {
what = "1,Failed to clone";
}
/ST-failure,FR-failed-to-checkout-revision-not-found/ {
what = "2,Git revision not found";
}
/ST-failure,FR-failed-to-resolve/ {
what = "3,Failed to resolve dependencies";
}
/ST-failure,FR-invalid-lockfile-supplied/ {
what = "4,Invalid upstream lockfile";
}
/ST-failure,FR-no-(package.json|build-script)/ {
what = "5,Conventions not followed";
}
/ST-failure,FR-expects-network/ {
what = "6,Expects network access";
}
/ST-failure,FR-needs-other-build-sys/ {
what = "7,Requires Yarn or pnpm";
}
/ST-failure,FR-has-deps-external-to-npm/ {
what = "8,Has dependencies outside npm";
}
/ST-failure,FR-misc-build-failure/ {
what = "9,Miscellaneous build failure";
}
/ST-built-once/ {
what = "10,Built only with upstream lockfile";
}
/ST-built-with-lockfiles-removed/ {
what = "11,Built with re-generated lockfile";
}
// {
if (what) {
counts[what]++;
}
if (what == "???.") {
print "##### " $0 > "/dev/stderr";
}
}
END {
print "ID,CATEGORY,COUNT";
for (key in counts) {
print key "," counts[key];
}
}