From d6f03a43290afb3236674dba709611febdeb6da3 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 19 Nov 2025 19:52:05 +0100 Subject: [PATCH] Document wildcard matching The include and exclude lists use different library functions which have different semantics for wildcards. Signed-off-by: Gilles Peskine --- scripts/check_names.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/check_names.py b/scripts/check_names.py index 9c0221281..1afbb8a13 100755 --- a/scripts/check_names.py +++ b/scripts/check_names.py @@ -289,7 +289,16 @@ class CodeParser(): Args: * include_wildcards: a List of shell-style wildcards to match filepaths. + - "*" does not match a directory separator, e.g. "*/a.h" + matches "somedir/a.h" but not "somedir/subdir/a.h". + - "**" matches zero or more directory levels, e.g. "**/a.h" + matches "a.h", "somedir/a.h", "somedir/subdir/a.h", etc. + - The matching is case-insensitive. * exclude_wildcards: a List of shell-style wildcards to exclude. + - "*" matches every character including separators, e.g. "*/a.h" + matches "somedir/a.h" and "somedir/subdir/a.h" but not "a.h". + - "**" is equivalent to "*". + - The matching is case-sensitive. Returns: * inc_files: A List of relative filepaths for included files.