From c81645bacbdc790051a3ea1202eafe911eb36dae Mon Sep 17 00:00:00 2001 From: bbedward Date: Thu, 30 Apr 2026 16:59:00 -0400 Subject: [PATCH] add pre-commit hook for console.log --- .pre-commit-config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40622581..dbc05ad9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,11 @@ repos: language: system files: ^core/.*\.(go|mod|sum)$ pass_filenames: false + - repo: local + hooks: + - id: no-console-in-qml + name: no console.* in QML (use Log service) + entry: bash -c 'if grep -nE "console\.(log|error|info|warn|debug)" "$@"; then echo "Use the Log service (log.info/warn/error/debug/fatal) instead of console.*" >&2; exit 1; fi' -- + language: system + files: ^quickshell/.*\.qml$ + exclude: ^quickshell/(Services/Log\.qml$|dms-plugins/|PLUGINS/)