summaryrefslogtreecommitdiff
path: root/tools/file_check.py
diff options
context:
space:
mode:
authorthread-liu <[email protected]>2021-04-12 09:41:45 +0800
committerthread-liu <[email protected]>2021-04-12 09:42:08 +0800
commit91a201264b653d0310a4418b59494a138ae9fd14 (patch)
treedc9fa7758c0909e1674dbd30ce77063fdfb434f3 /tools/file_check.py
parenta193547f2e5eaaec6f88c57c11dd719f967733ff (diff)
[update] ignore dir path check.
Diffstat (limited to 'tools/file_check.py')
-rw-r--r--tools/file_check.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/file_check.py b/tools/file_check.py
index 3e7ac6fc1c..e79332b325 100644
--- a/tools/file_check.py
+++ b/tools/file_check.py
@@ -54,7 +54,9 @@ class CheckOut:
except Exception as e:
logging.error(e)
continue
-
+ logging.debug("ignore file path: {}".format(ignore_file_path))
+ logging.debug("file_ignore: {}".format(file_ignore))
+ logging.debug("dir_ignore: {}".format(dir_ignore))
try:
# judge file_path in the ignore file.
for file in file_ignore:
@@ -68,7 +70,7 @@ class CheckOut:
for _dir in dir_ignore:
if _dir is not None:
dir_real_path = os.path.join(dir_name, _dir)
- if dir_real_path == file_dir_path:
+ if file_dir_path.startswith(dir_real_path):
logging.info("ignore dir path: {}".format(dir_real_path))
return 0
except Exception as e:
@@ -139,7 +141,7 @@ class FormatCheck:
def check(self):
logging.info("Start to check files format.")
if len(self.file_list) == 0:
- logging.warning("There are no files to check license.")
+ logging.warning("There are no files to check format.")
return True
encoding_check_result = True
format_check_result = True