Skip to content

Commit 211b62a

Browse files
authored
Merge pull request #4598 from thread-liu/master
[update] ignore dir path check.
2 parents a193547 + 91a2012 commit 211b62a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tools/file_check.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def __exclude_file(self, file_path):
5454
except Exception as e:
5555
logging.error(e)
5656
continue
57-
57+
logging.debug("ignore file path: {}".format(ignore_file_path))
58+
logging.debug("file_ignore: {}".format(file_ignore))
59+
logging.debug("dir_ignore: {}".format(dir_ignore))
5860
try:
5961
# judge file_path in the ignore file.
6062
for file in file_ignore:
@@ -68,7 +70,7 @@ def __exclude_file(self, file_path):
6870
for _dir in dir_ignore:
6971
if _dir is not None:
7072
dir_real_path = os.path.join(dir_name, _dir)
71-
if dir_real_path == file_dir_path:
73+
if file_dir_path.startswith(dir_real_path):
7274
logging.info("ignore dir path: {}".format(dir_real_path))
7375
return 0
7476
except Exception as e:
@@ -139,7 +141,7 @@ def __check_file(self, file_lines, file_path):
139141
def check(self):
140142
logging.info("Start to check files format.")
141143
if len(self.file_list) == 0:
142-
logging.warning("There are no files to check license.")
144+
logging.warning("There are no files to check format.")
143145
return True
144146
encoding_check_result = True
145147
format_check_result = True

0 commit comments

Comments
 (0)