summaryrefslogtreecommitdiff
path: root/util/config_option_check.py
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2015-09-18 13:33:14 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-09-18 16:34:20 -0700
commit6e96a91f24b0c0d68712cb792abb0840437f300e (patch)
tree46f98f2aed858b37587908021a309c65c71783f4 /util/config_option_check.py
parentd79b54fdd9e5cfc1d5c46c41af9e0701f90fb576 (diff)
downloadchrome-ec-6e96a91f24b0c0d68712cb792abb0840437f300e.tar.gz
config_option_check.py: Ignore hidden files.
When this script is searching through CONFIG_* options used in the repo, it should ignore hidden files. I uncovered this by accidentally having modified a file and the presubmit hook failed. This is because emacs auto-saves files with the format ".#filename.ext". Now, the script will ignore hidden files. BUG=None BRANCH=None TEST=Use emacs to modify a c file but not save it. Run the script and verify that no errors occur. TEST=make -j buildall tests Change-Id: Ie09cfcf66f2e416aeed99847945cb5168b457d1a Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/300954 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'util/config_option_check.py')
-rwxr-xr-xutil/config_option_check.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/config_option_check.py b/util/config_option_check.py
index ea681a2787..95bb72a1f6 100755
--- a/util/config_option_check.py
+++ b/util/config_option_check.py
@@ -92,6 +92,9 @@ def obtain_config_options_in_use():
if 'private' in dirnames:
dirnames.remove('private')
for f in filenames:
+ # Ignore hidden files.
+ if f.startswith('.'):
+ continue
# Only consider C source, assembler, and Make-style files.
if (os.path.splitext(f)[1] in ('.c', '.h', '.inc', '.S', '.mk') or
'Makefile' in f):