Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 6d66e00

Browse files
committed
Add condition for additional checks
1 parent dda1890 commit 6d66e00

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

script/validators/source_validator.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def check_tests(file_path):
220220
if not file_status:
221221
LOG.info("Test class names should end with 'Tests' suffix.")
222222
return file_status
223+
223224
# check method naming
224225

225226
VALIDATORS = [
@@ -244,6 +245,11 @@ def validate_file(file_path):
244245
if not validator(file_path):
245246
file_status = False
246247

248+
relative_path = file_path.replace(PELOTON_DIR, '')
249+
if relative_path.startswith('/test/') and relative_path.endswith('.cpp'):
250+
if not relative_path.endswith('_util.cpp'):
251+
file_status = check_tests(file_path)
252+
247253
return file_status
248254

249255

0 commit comments

Comments
 (0)