Skip to content

Commit

Permalink
Change the output of the add_header script Fix rucio#4980
Browse files Browse the repository at this point in the history
The `add_header` sript prints the correct header for a file if the `--in-place`
argument is not provided. This is a good way to see changes, however due to this
the output of the CI/CD is too verbose.

This commit disables the output of the output of the correct header, if the
`--check` option is provided. It also displays the number of files checked.
  • Loading branch information
Joel Dierkes committed Dec 16, 2021
1 parent 9a23c28 commit eb94745
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/add_header
Expand Up @@ -95,6 +95,7 @@ def main(arguments):
email = '<%s>' % email
exit_code = 0

print("Checking %i files" % (len(arguments.MyFiles)))
for MyFile in arguments.MyFiles:
# Query log history
cmd = '''git log --reverse --date=short --format='%s' %s ''' % ('%aN,<%aE>,%ad', MyFile)
Expand Down Expand Up @@ -244,7 +245,7 @@ def main(arguments):
if count == 0 or not_comment_line:
modified.write(line)

else:
elif not arguments.check:
print(header)
exit(exit_code)

Expand Down

0 comments on commit eb94745

Please sign in to comment.