-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: improve pre-commit hook #265
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #265 +/- ##
=======================================
Coverage 94.42% 94.42%
=======================================
Files 218 218
Lines 24691 24691
=======================================
Hits 23314 23314
Misses 1377 1377 ☔ View full report in Codecov by Sentry. |
@@ -18,6 +18,9 @@ test FEATURE='': | |||
cargo test --features {{FEATURE}} | |||
fi | |||
|
|||
fmt: | |||
@just format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an alias for just format
, so you can also do just fmt
COMMIT_MSG=$(cat "$COMMIT_MSG_FILE") | ||
|
||
# Regular expression to match Conventional Commits format | ||
CONVENTIONAL_COMMIT_REGEX="^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(\S+\))?: .+$" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried to do it with convco
first but it was giving me some issues so i just did a regex :P
Description and Motivation
This PR improves the pre-commit hook, formatting not only rust files but also toml and shell scripts files.
It also introduces a commit-msg hook, which makes sure the conventional commit format is being used.
Related Issues
Checklist:
Update index.md
)cargo fmt --all --
.cargo clippy -- -D warnings
.cargo schema
.