mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-08 00:10:21 +08:00
feat(tool): Adding license header check and apply tool (#857)
* feat(tool): Adding license header check and apply tool * Update docs/LICENSE_HEADERS.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update scripts/license_header.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
11
pre-commit
11
pre-commit
@@ -20,6 +20,17 @@ if [ $FORMAT_RESULT -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check license headers
|
||||
echo "Checking license headers..."
|
||||
make check-license-all
|
||||
LICENSE_RESULT=$?
|
||||
|
||||
if [ $LICENSE_RESULT -ne 0 ]; then
|
||||
echo "❌ Some files are missing license headers."
|
||||
echo "Run 'make add-license-all' to add them automatically."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If any files were reformatted, add them back to staging
|
||||
git diff --name-only | xargs -I {} git add "{}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user