feat: add code quality check script and license config#151
feat: add code quality check script and license config#151discivigour wants to merge 1 commit intoapache:mainfrom
Conversation
| echo "" | ||
| echo "[1/4] Checking license headers..." | ||
| if command -v license-eye &> /dev/null; then | ||
| license-eye header check |
There was a problem hiding this comment.
This project already uses skywalking-eyes to check for licenses.
There was a problem hiding this comment.
Where is the skywalking-eyes? You mean ci.yml? I added this script to facilitate local verification.
There was a problem hiding this comment.
Where is the skywalking-eyes? You mean ci.yml? I added this script to facilitate local verification.
Nice initiative! For the "facilitate local verification" goal, a pre-commit hook might be more appropriate — it runs automatically on every commit, so contributors can't forget. Consider adding a .pre-commit-config.yaml for fmt/clippy checks. The Makefile targets and .licenserc.yaml are still valuable and can be kept. The dev/check.sh script could be simplified or removed if pre-commit covers the same ground.
There was a problem hiding this comment.
Thanks, I will try it.
There was a problem hiding this comment.
Thanks for the suggestion! I did look into pre-commit hooks and .pre-commit-config.yaml before going with dev/check.sh.
I don't think it's necessary to introduce git hooks at present. Because it cannot be uploaded to the repository, or relies on external plugins, or is manually configured, and the current repository is not very large at present.
dev/check.sh provides an easy, zero-dependency way for contributors to verify locally, and CI serves as the final safeguard. I think this combination is sufficient for the current project scale without introducing additional tooling overhead. We can revisit this if the project grows and the team scales.
Purpose
Add code quality check script and license config.
Brief change log
Tests
API and Format
Documentation