Skip to content

Commit d6f03a4

Browse files
Document wildcard matching
The include and exclude lists use different library functions which have different semantics for wildcards. Signed-off-by: Gilles Peskine <[email protected]>
1 parent 16236cb commit d6f03a4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/check_names.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,16 @@ def get_all_files(self, include_wildcards, exclude_wildcards):
289289
290290
Args:
291291
* include_wildcards: a List of shell-style wildcards to match filepaths.
292+
- "*" does not match a directory separator, e.g. "*/a.h"
293+
matches "somedir/a.h" but not "somedir/subdir/a.h".
294+
- "**" matches zero or more directory levels, e.g. "**/a.h"
295+
matches "a.h", "somedir/a.h", "somedir/subdir/a.h", etc.
296+
- The matching is case-insensitive.
292297
* exclude_wildcards: a List of shell-style wildcards to exclude.
298+
- "*" matches every character including separators, e.g. "*/a.h"
299+
matches "somedir/a.h" and "somedir/subdir/a.h" but not "a.h".
300+
- "**" is equivalent to "*".
301+
- The matching is case-sensitive.
293302
294303
Returns:
295304
* inc_files: A List of relative filepaths for included files.

0 commit comments

Comments
 (0)