With "pass_filenames: True" (the default) the spell check entry
will be invoked as "make -C doc spelling <file1> <file2> ..."
which will cause the default Make target to be run for the specified
files, leading to errors like:
. .sphinx/venv/bin/activate; sphinx-build -M doc/some_file "." "_build"
Running Sphinx v7.3.7
Sphinx error:
Builder name doc/some_file not registered or available through entry point
Since the spelling target will check all files, we can suppress sending
any filenames.
Check for any changed .rst files in the doc/ directory and run
`make spelling` if any changes are detected.
The files directives per hook have to be more restrictive than the
global hook, so this also slightly changes the files match for
the other hooks.