static-checks: remove check on modified files
Remove checks on existing files as there is no need to flag warnings on
these. Only in new files should there be a warning when the copyright
year is missing or doesn't match the current year.
Signed-off-by: Harrison Mutai <harrison.mutai@arm.com>
Change-Id: Ieea2a6478361377e073f27e343980a3323375ae9
diff --git a/script/static-checks/check-copyright.py b/script/static-checks/check-copyright.py
index 2f084e0..a05b4ca 100755
--- a/script/static-checks/check-copyright.py
+++ b/script/static-checks/check-copyright.py
@@ -105,11 +105,11 @@
print ("License regexp: " + LICENSE_ID_LINE)
if args.patch:
- print("Checking files modified between patches " + args.from_ref
+ print("Checking files added between patches " + args.from_ref
+ " and " + args.to_ref + "...")
(rc, stdout, stderr) = utils.shell_command(['git', 'diff',
- '--diff-filter=ACMRT', '--name-only', args.from_ref, args.to_ref ])
+ '--diff-filter=ACRT', '--name-only', args.from_ref, args.to_ref ])
if rc:
return COPYRIGHT_ERROR