mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-07-31 17:38:33 +00:00
Add PMD and precommit for format and license header checking. (#1017)
Use package goal as project doesn't support earlier lifecycle phases.
This commit is contained in:
17
scripts/check-format-and-headers.sh
Executable file
17
scripts/check-format-and-headers.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z ${GITHUB_MODIFIED_FILES} ]]
|
||||
then
|
||||
modified_files=$(git diff --cached --name-only --diff-filter=ACMR)
|
||||
else
|
||||
modified_files=${GITHUB_MODIFIED_FILES}
|
||||
fi
|
||||
|
||||
include_list=""
|
||||
for file in ${modified_files}
|
||||
do
|
||||
include_list="${include_list},${file}"
|
||||
done
|
||||
include_list=${include_list:1}
|
||||
|
||||
mvn spotless:apply validate -DlicenseUpdateHeaders=true -Dspotless-include-list="${include_list}" > /dev/null || true
|
Reference in New Issue
Block a user