diff options
Diffstat (limited to 'compute-status-counts.awk')
-rw-r--r-- | compute-status-counts.awk | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/compute-status-counts.awk b/compute-status-counts.awk new file mode 100644 index 0000000..a7da4c0 --- /dev/null +++ b/compute-status-counts.awk @@ -0,0 +1,84 @@ +## 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]; + } +} |