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/)