提交 1439ebd2 编写于 作者: A Ariel Marcovitch 提交者: Masahiro Yamada

checkkconfigsymbols.py: Fix the '--ignore' option

It seems like the implementation of the --ignore option is broken.

In check_symbols_helper, when going through the list of files, a file is
added to the list of source files to check if it matches the ignore
pattern. Instead, as stated in the comment below this condition, the
file should be added if it doesn't match the pattern.

This means that when providing an ignore pattern, the only files that
will be checked will be the ones we want the ignore, in addition to the
Kconfig files that don't match the pattern (the check in
parse_kconfig_files is done right)
Signed-off-by: NAriel Marcovitch <arielmarcovitch@gmail.com>
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
上级 5df77ad6
...@@ -329,7 +329,7 @@ def check_symbols_helper(pool, ignore): ...@@ -329,7 +329,7 @@ def check_symbols_helper(pool, ignore):
if REGEX_FILE_KCONFIG.match(gitfile): if REGEX_FILE_KCONFIG.match(gitfile):
kconfig_files.append(gitfile) kconfig_files.append(gitfile)
else: else:
if ignore and not re.match(ignore, gitfile): if ignore and re.match(ignore, gitfile):
continue continue
# add source files that do not match the ignore pattern # add source files that do not match the ignore pattern
source_files.append(gitfile) source_files.append(gitfile)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册