mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
20201103 no commit title check (#12447)
* Turn off checking of format of commit message. * scripts/fix.sh: Fix fixing whitespaces in *.sh scripts Aparently there is a difference between: find ./ -print0 -name *.sh and find ./ -name *.sh -print0 * etcdserver unit tests: Do not call .Fatalf(...) from not test's goroutine. Fixes following test failures: https://travis-ci.com/github/etcd-io/etcd/jobs/425920416 ``` % (cd server && go vet ./...) stderr: # go.etcd.io/etcd/server/v3/etcdserver stderr: etcdserver/server_test.go:1002:4: call to (*T).Fatalf from a non-test goroutine stderr: etcdserver/server_test.go:1166:4: call to (*T).Fatalf from a non-test goroutine FAIL: (code:2): % (cd server && go vet ./...) FAIL: 'run go vet ./...' checking failed (!=0 return code) FAIL: 'govet' failed at Tue Nov 3 04:07:47 UTC 2020 ```
This commit is contained in:
25
test
25
test
@@ -303,7 +303,6 @@ function fmt_pass {
|
||||
revive \
|
||||
license_header \
|
||||
receiver_name \
|
||||
commit_title \
|
||||
mod_tidy \
|
||||
dep \
|
||||
shellcheck \
|
||||
@@ -421,30 +420,6 @@ function receiver_name_pass {
|
||||
run_for_modules receiver_name_for_package
|
||||
}
|
||||
|
||||
function commit_title_pass {
|
||||
git log --oneline "$(git merge-base HEAD master)"...HEAD | while read -r l; do
|
||||
commitMsg=$(echo "$l" | cut -f2- -d' ')
|
||||
if [[ "$commitMsg" == Merge* ]]; then
|
||||
# ignore "Merge pull" commits
|
||||
continue
|
||||
fi
|
||||
if [[ "$commitMsg" == Revert* ]]; then
|
||||
# ignore revert commits
|
||||
continue
|
||||
fi
|
||||
|
||||
pkgPrefix=$(echo "$commitMsg" | cut -f1 -d':')
|
||||
spaceCommas=$(echo "$commitMsg" | sed 's/ /\n/g' | grep -c ',$' || echo 0)
|
||||
commaSpaces=$(echo "$commitMsg" | sed 's/,/\n/g' | grep -c '^ ' || echo 0)
|
||||
if [[ $(echo "$commitMsg" | grep -c ":..*") == 0 || "$commitMsg" == "$pkgPrefix" || "$spaceCommas" != "$commaSpaces" ]]; then
|
||||
log_error "$l"...
|
||||
log_error "Expected commit title format '<package>{\", \"<package>}: <description>'"
|
||||
log_error "Got: $l"
|
||||
return 255
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# goword_for_package package
|
||||
# checks spelling and comments in the 'package' in the current module
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user