mirror of
https://github.com/netbirdio/netbird.git
synced 2026-03-31 06:34:19 -04:00
* Add local lint setup with pre-push hook to catch issues early Developers can now catch lint issues before pushing, reducing CI failures and iteration time. The setup uses golangci-lint locally with the same configuration as CI. Setup: - Run `make setup-hooks` once after cloning - Pre-push hook automatically lints changed files (~90s) - Use `make lint` to manually check changed files - Use `make lint-all` to run full CI-equivalent lint The Makefile auto-installs golangci-lint to ./bin/ using go install to match the Go version in go.mod, avoiding version compatibility issues. --------- Co-authored-by: mlsmaycon <mlsmaycon@gmail.com>
12 lines
205 B
Bash
Executable File
12 lines
205 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "Running pre-push hook..."
|
|
if ! make lint; then
|
|
echo ""
|
|
echo "Hint: To push without verification, run:"
|
|
echo " git push --no-verify"
|
|
exit 1
|
|
fi
|
|
|
|
echo "All checks passed!"
|