[whitespace-hook] Check only those files we really intent to check.
- For markdown files, check them if they are in the toplevel directory or below
doc/
. - For the files that should only occur in the toplevel directory, make sure to
only match them in the toplevel directory. This allows having them in an
imported header only library in some subdirectory.
- For files such as
.cc
or.hh
that are matched by extension, there is no sane generic way to not check them when they are imported from somewhere else, so you'll still have to do something special, sorry.
- For files such as
- For files that are matched by name, make sure that name matches the full basename of the file, not just a suffix.
- Pass the regular expressions to perl in a safe way so they can contain arbitrary character without arcane quoting. This mostly applies to the path separator '/'.
Fixes: #106 (closed).
Edited by Jö Fahlke