vale-pre-commit: quote-safe staged-file handling; block on error/warning only
Iterates and joins the staged-file list by newline only, with globbing
disabled, so a staged filename containing a space or a glob character
(e.g. "release notes.qdoc") is handled as one correct path instead of
being word-split or glob-expanded - both when building $QDOC_ABS/$CPP_ABS
and where they are later expanded. Restored once that expansion is done.
Reworks the hook's severity handling:
- Vale now runs with --no-global (keeps a developer's personal
machine-global config from gating other people's commits) and
--output=JSON instead of --output=line, because the hook needs
severity to decide whether to block and the line format omits it
- error/warning alerts are reported and block the commit (exit 1);
suggestion alerts are reported under a separate "not blocking"
heading and the commit proceeds (exit 0) - previously any alert at
all blocked
- if Vale itself fails to run (unloadable config, missing
StylesPath), the hook reports why and exits 0 - a broken linter must
not block commits
- documents the styles/Microsoft/ silent-under-lint trap: since rules
are enabled individually rather than through BasedOnStyles, a
missing sync download doesn't fail the hook, it just skips every
Microsoft.* rule without saying so
Change-Id: Ie89e87e22bc3a3fbc1cbb48fbee34b0dc614e76b
Reviewed-by: Alexei Cazacov <alexei.cazacov@qt.io>