vale: Update pre-commit hook to resolve config via ~/.vale-qdoc-agent.json


The hook now reads vale_qdoc_bin and vale_config_path from
~/.vale-qdoc-agent.json (if present) before falling back to the
VALE_QDOC_BIN and VALE_CONFIG_PATH environment variables. This allows
users to configure the hook without setting environment variables in
their shell profile.

Resolution order for each setting:
  1. ~/.vale-qdoc-agent.json  (vale_qdoc_bin / vale_config_path)
  2. Environment variable     (VALE_QDOC_BIN / VALE_CONFIG_PATH)
  3. Error — print a message and exit 1

Also hardens the error cases: missing binary or config now exits with
code 1 instead of silently skipping, so CI catches misconfigured hooks.

Change-Id: Id113d230fa58997445d8932034cde16dba5778bd
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit371cc374556327157f955a94369c0211ab431b4d
parent1b1af8e22a62852ebddfd0cf2286ec712d56e0e3
authorVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>
committerVenugopal Shivashankar <Venugopal.Shivashankar@qt.io>
commit timeTue, 26 May 2026 09:25:59 +0000