Vale: Add pre-commit hook for linting QDoc sources
Add vale-pre-commit, a shell/Python pre-commit hook that lints staged
QDoc-aware source files using Vale with the QDoc parser patch.
Key behaviours:
- Lints .qdoc, .qdocinc, and .qml files directly.
- For .cpp/.h files, extracts /*!...*/ doc-comment blocks that overlap
with staged changes and lints them via a temp .qdoc file with
blank-line padding to preserve original line numbers.
- Filters Vale alerts to the changed column range of each changed line:
for single-line edits, a pre-existing warning at the start of the
line is not reported if only the end of the line was modified.
- Multi-line hunks and pure additions treat all columns as changed.
- Blocks the commit on warnings and errors; suggestions are ignored.
- Respects VALE_QDOC_BIN env var to override the Vale binary path.
Update README.txt with sections on linting QDoc sources and how to
install and configure the pre-commit hook.
Change-Id: Iedd01e7589947011d48d084ec1556de8ab11c73c
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>