diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1d5da05ed..76d7d1411 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -98,6 +98,12 @@ One must support their proposed changes with unit tests. As you submit a pull request(PR) the CI generates a code coverage report. It will help you identify parts of the code that are not yet covered in unit tests. +#### Go + +##### Import Groups + +There should be two groups of import blocks, one for stdlib and the other for everything else. + ## Understanding code structure This is a nonexhaustive list important packages that happen to cover most of the code base. diff --git a/ci-checks.sh b/ci-checks.sh index ed5dde6f5..c793c1123 100755 --- a/ci-checks.sh +++ b/ci-checks.sh @@ -28,6 +28,10 @@ if ! nixfmt shell.nix; then failed=1 fi +if ! git ls-files '*.go' | xargs -I% sh -c 'sed -i "/^import (/,/^)/ { /^\s*$/ d }" % && gofumpt -w -s %'; then + failed=1 +fi + if ! git diff | (! grep .); then failed=1 fi