mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-04 21:51:28 +00:00
* Add basic setup for precommit * Update README.md with instructions on installing precommit hooks --------- Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com> Co-authored-by: Bartlomiej Wroblewski <bwroblewski10@gmail.com>
18 lines
353 B
Bash
Executable File
18 lines
353 B
Bash
Executable File
#!/bin/bash
|
|
|
|
current_year=$(date +%Y)
|
|
exit_code=0
|
|
|
|
for file in $@; do
|
|
if grep -q "Copyright (c)" $file
|
|
then
|
|
if ! grep -q "Copyright (c).*$current_year" $file
|
|
then
|
|
echo "ERROR: File $file has a copyright notice without the current year ($current_year)."
|
|
exit_code=1
|
|
fi
|
|
fi
|
|
done
|
|
|
|
exit $exit_code
|