java-topology/defects/psalm/bench/run_all.py
russell@unturf.com bb81a1a3a0
wave4: psalm-0001 flagship patch + linter/CI/config scan survey
psalm-0001: FileFilter.allowsClass runs in_array() on every class the
analyzer visits. For C classes and F filter entries, per-run cost is
O(C*F). Fix: lazy array_fill_keys hash set; O(1) probe per class.
Bench: 336x at C=F=5000. Patch + ticket + bench + intel brief ship.

wave4-linter-ci-survey.md: consolidated report on 40 projects scanned
across linters (eslint, biome, prettier, pylint, ruff, black, rubocop,
shellcheck, stylelint, sqlfluff, phpstan, PHP_CodeSniffer, psalm,
rustfmt, golangci-lint, scalafmt, hadolint, yamllint, markdownlint,
ktlint, detekt), CI runners (act, buildkite-agent, tektoncd/pipeline,
concourse, woodpecker), config management (aws-cdk, cdk8s, kustomize),
and build tools (rollup, parcel, vite, turborepo, nx, lerna, swc,
babel, gulp).

Clean scans (zero HIGH+ findings): hadolint, shellcheck, gulp.

Document includes per-target finding counts and 7 triage follow-ups for
future waves (PHP_CodeSniffer ReDoS, ktlint spacing rule, pylint
MSG_ORDER.index, black pgen2 dfa, golangci-lint migrate, tektoncd
forbidden-env scan, aws-cdk region-info).
2026-04-24 17:21:51 -04:00

19 lines
708 B
Python

#!/usr/bin/env python3
import importlib.util, os, sys
BENCH_DIR = os.path.dirname(os.path.abspath(__file__))
def load_module(filename):
path = os.path.join(BENCH_DIR, filename)
spec = importlib.util.spec_from_file_location("mod", path)
mod = importlib.util.module_from_spec(spec)
spec.loader.exec_module(mod)
return mod
all_lines = []
for fname in ["bench-psalm-0001.py"]:
mod = load_module(fname)
lines = mod.run()
all_lines.extend(lines); all_lines.append("")
print(); sys.stdout.flush()
out_path = os.path.join(BENCH_DIR, "results.txt")
with open(out_path, "w") as f:
f.write("\n".join(all_lines) + "\n")
print(f"results written to {out_path}"); sys.stdout.flush()