Skip to content

Commit

Permalink
use ./... alias instead of PACKAGE_NAMES
Browse files Browse the repository at this point in the history
Now that we've stopped our tools from conflicting over `func main`, we
can use the Go tooling's `./...` alias to make them operate over all of
our packages. See `go help packages` for more on `...`. (Those conflicts
were solved in #947).

This means we no longer have to remember to update this variable every
time we want to test or lint a new package in CI and locally.
  • Loading branch information
jmhodges committed Aug 26, 2024
1 parent 4238814 commit 95928a5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
PACKAGE_NAMES := github.com/mozilla-services/autograph github.com/mozilla-services/autograph/database github.com/mozilla-services/autograph/formats github.com/mozilla-services/autograph/signer github.com/mozilla-services/autograph/signer/apk2 github.com/mozilla-services/autograph/signer/contentsignature github.com/mozilla-services/autograph/signer/contentsignaturepki github.com/mozilla-services/autograph/signer/genericrsa github.com/mozilla-services/autograph/signer/gpg2 github.com/mozilla-services/autograph/signer/mar github.com/mozilla-services/autograph/signer/xpi github.com/mozilla-services/autograph/verifier/contentsignature github.com/mozilla-services/autograph/tools/autograph-monitor

# The GOPATH isn't always on the path.
GOPATH := $(shell go env GOPATH)
Expand Down Expand Up @@ -48,7 +47,7 @@ fmt-diff:
gofmt -d *.go database/ signer/ tools/autograph-client/ tools/autograph-monitor tools/softhsm/ tools/hawk-token-maker/ tools/make-hsm-ee/ tools/makecsr/ tools/genpki/

fmt-fix:
go fmt $(PACKAGE_NAMES)
go fmt ./...
gofmt -w tools/autograph-client/ tools/softhsm/ tools/hawk-token-maker/ tools/make-hsm-ee/ tools/makecsr/ tools/genpki/

benchmarkxpi:
Expand All @@ -61,7 +60,7 @@ race:
go test -race -covermode=atomic -count=1 $(PACKAGE_NAMES)

test:
go test -v -coverprofile coverage.out -covermode=count -count=1 $(PACKAGE_NAMES)
go test -v -coverprofile coverage.out -covermode=count -count=1 ./...

test-in-docker:
$(SHELL) -c " \
Expand Down

0 comments on commit 95928a5

Please sign in to comment.