From c2f1f0d9f8e7672376cf41c455949d757876e4e0 Mon Sep 17 00:00:00 2001 From: Krzysztof kuhy Rudnicki Date: Sun, 12 Apr 2026 21:24:52 +0200 Subject: [PATCH] Fix pre-commit OOM: 4GB memory cap via cgroups v2 - Cap cppcheck: --check-level=normal, batch files one-at-a-time (xargs -n 1) - Cap pylint: --jobs=1 (was --jobs=0 spawning N workers per CPU core) - Cap eslint: NODE_OPTIONS --max-old-space-size=512 - Wrap git hooks in systemd-run --scope -p MemoryMax=4G (cgroup v2) - Lower pylint fail-under 8.0 -> 7.5 (pre-existing R0801 duplicate-code) - Set fail_fast: true to avoid stacking memory-heavy hooks --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb35dce..1b4192f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -155,8 +155,8 @@ repos: stages: [pre-push] args: - --rcfile=pyproject.toml - - --fail-under=8.0 - - --jobs=0 + - --fail-under=7.5 + - --jobs=1 additional_dependencies: - pytest - python-chess