-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add Coverity defect fix commit checker support #6777
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
Conversation
29a9338 to
d11cddd
Compare
scripts/commitcheck.sh
Outdated
|
|
||
| function is_coverity_fix() | ||
| { | ||
| # subject starts with OpenZFS means it's an openzfs port |
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.
Update the comment here to reflect this is a coverify not openzfs commit.
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.
Good catch, fixed.
d11cddd to
4528e4e
Compare
| git log -n 1 --pretty=%b "$REF" | egrep '^CID' | while read -r line; do | ||
| echo "$line" | egrep '^CID [[:digit:]]+: ([[:graph:]]+|[[:space:]])+ \(([[:upper:]]|\_)+\)' > /dev/null | ||
| if [[ $? -ne 0 ]]; then | ||
| echo "error: commit message has an improperly formatted CID defect line" |
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.
I think there's going to be a subshell problem here... going to need to fix that.
Enable commitcheck.sh to test if a commit message is in the expected format for a coverity defect fix. Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
4528e4e to
8c54df9
Compare
Codecov Report
@@ Coverage Diff @@
## master #6777 +/- ##
==========================================
- Coverage 75.17% 74.49% -0.69%
==========================================
Files 297 297
Lines 94374 94371 -3
==========================================
- Hits 70947 70298 -649
- Misses 23427 24073 +646
Continue to review full report at Codecov.
|
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.
LGTM, thanks!
Enable commitcheck.sh to test if a commit message is in the expected format for a coverity defect fix. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#6777
Enable commitcheck.sh to test if a commit message is in the expected format for a coverity defect fix. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#6777
Enable commitcheck.sh to test if a commit message is in the expected format for a coverity defect fix. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#6777
Enable commitcheck.sh to test if a commit message is in the expected format for a coverity defect fix. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#6777
Enable commitcheck.sh to test if a commit message is in the expected format for a coverity defect fix. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#6777
Enable commitcheck.sh to test if a commit message is in the expected format for a coverity defect fix. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov> Closes openzfs#6777
Description
Enable commitcheck.sh to test if a commit message is
in the expected format for coverity defect fixes.
Motivation and Context
Automate commit message checking for coverity defect fixes.
How Has This Been Tested?
Locally on a RHEL 7 based system.
Types of changes
Checklist:
Signed-off-by.