History

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)

Ariel Marcovitch committed 5 years ago

Commit 1439ebd1 parent 5df77ad1 file · +1 −1Browse files

Unified · Split

scripts/checkkconfigsymbols.py+1−1
@@ -329,7 +329,7 @@ def check_symbols_helper(pool, ignore): · 328 unmodified lines
329 if REGEX_FILE_KCONFIG.match(gitfile):329 if REGEX_FILE_KCONFIG.match(gitfile):
330 kconfig_files.append(gitfile)330 kconfig_files.append(gitfile)
331 else:331 else:
332 if ignore and not re.match(ignore, gitfile):332 if ignore and re.match(ignore, gitfile):
333 continue333 continue
334 # add source files that do not match the ignore pattern334 # add source files that do not match the ignore pattern
335 source_files.append(gitfile)335 source_files.append(gitfile)