Skip to content

Commit 046dc8e

Browse files
pb8oalxiord
authored andcommitted
fix(tests): fail if copyright message is not found
Missed the case when the copyright notice does not appear anywhere in the file. Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
1 parent 9cb8ea8 commit 046dc8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/integration_tests/style/test_licenses.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def _validate_license(filename):
5757
if line.startswith(("// Copyright", "# Copyright")):
5858
copyright_info = line
5959
break
60+
if line == "":
61+
return False
6062

6163
has_amazon_copyright = _has_amazon_copyright(
6264
copyright_info

0 commit comments

Comments
 (0)