namecoin / certinject

Inject certificates into Windows CryptoAPI trust store, with EKU and name constraints.
https://www.namecoin.org/
GNU General Public License v3.0
2 stars 5 forks source link

add golangci-linter, simplify travis.yml, delint some small stuff #6

Closed aerth closed 4 years ago

aerth commented 4 years ago

Reorder OS tests, so that we run the Windows tests first.

Simplify travis.yml, make all OS run testdata/travis.bash (where it's easier to switch on conditions)

Simplify error check in nss.go

Miscellaneous whitespace-related delinting, left some non-trivial things for another time/place

Since Go module support was added in Go 1.11... the Go 1.10 tests we weren't using the pull request's source code (we were fetching master branch of this repo). To workaround this, we copy the source into $GOPATH/src/github.com/namecoin/certinject to avoid downloading the master branch. This only happens in Go 1.10 test run. For go 1.11 and 1.12, we set GO111MODULE to activate go module support. (its active by default in newer versions)

Add a lint stage, which runs golangci-linter. It's allowed to fail for now, but the travis build logs are helpful.

JeremyRand commented 4 years ago

utACK 82f3198fc04710fea48daccbbb75aa19da402948 except for the inline review I posted above.

JeremyRand commented 4 years ago

Still remaining from my review:

utACK 13b62d35f55fe30f0537c471798dc48342a38a54; I'm fine with deferring the remaining review item to a separate issue/PR.