diff --git a/.github/linters/.golangci.yml b/.github/linters/.golangci.yml new file mode 100644 index 0000000..389317d --- /dev/null +++ b/.github/linters/.golangci.yml @@ -0,0 +1,47 @@ +run: + modules-download-mode: readonly + show-stats: true + +output: + print-linter-name: false + sort-results: true + +linters: + enable: + # List generated from: https://golangci-lint.run/usage/linters/ + # We are enabling all defaults as well as any bug/security related + - asasalint + - asciicheck + - bidichk + - bodyclose + - contextcheck + - durationcheck + - errcheck + - errchkjson + - errorlint + - exhaustive + - exportloopref + - gocheckcompilerdirectives + - gochecksumtype + - gocritic + - gofmt + - gosec + - gosimple + - gosmopolitan + - govet + - ineffassign + - loggercheck + - makezero + - musttag + - nilerr + - noctx + - protogetter + - reassign + - revive + - rowserrcheck + - spancheck + - sqlclosecheck + - staticcheck + - testifylint + - unused + - zerologlint diff --git a/.github/linters/.jscpd.json b/.github/linters/.jscpd.json index 6eb5f17..3a60fa8 100644 --- a/.github/linters/.jscpd.json +++ b/.github/linters/.jscpd.json @@ -1,3 +1,5 @@ { - "threshold": 3 + "ignore": [ + "**/*.go,**/go-test*.yaml" + ] } \ No newline at end of file diff --git a/.github/workflows/go-test-darwin.yaml b/.github/workflows/go-test-darwin.yaml index 7e9d9c4..80381a6 100644 --- a/.github/workflows/go-test-darwin.yaml +++ b/.github/workflows/go-test-darwin.yaml @@ -1,6 +1,7 @@ name: go test darwin -on: [push] +on: [pull_request, workflow_dispatch] + permissions: contents: read @@ -12,7 +13,7 @@ jobs: strategy: matrix: go: ["1.21"] - os: [macos-latest] + os: [macos-13] steps: - name: checkout repository @@ -26,4 +27,15 @@ jobs: go-version: ${{ matrix.go }} - name: run go test - run: go test -v -p 1 ./... + run: go test -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... + + - name: Store coverage file + uses: actions/upload-artifact@v4 + with: + name: cover.out + path: ./cover.out + + coverage: + name: coverage + needs: go-test-darwin + uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2 diff --git a/.github/workflows/go-test-linux.yaml b/.github/workflows/go-test-linux.yaml index 7d702e8..a016aa1 100644 --- a/.github/workflows/go-test-linux.yaml +++ b/.github/workflows/go-test-linux.yaml @@ -26,4 +26,15 @@ jobs: go-version: ${{ matrix.go }} - name: run go test - run: go test -v -p 1 ./... + run: go test -v -p 1 -coverprofile=./cover.out -covermode=atomic -coverpkg=./... ./... + + - name: Store coverage file + uses: actions/upload-artifact@v4 + with: + name: cover.out + path: ./cover.out + + coverage: + name: coverage + needs: go-test-linux + uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2 diff --git a/.github/workflows/go-test-windows.yaml b/.github/workflows/go-test-windows.yaml index 593fdc1..0b0a01d 100644 --- a/.github/workflows/go-test-windows.yaml +++ b/.github/workflows/go-test-windows.yaml @@ -1,6 +1,6 @@ name: go test windows -on: [push] +on: [pull_request, workflow_dispatch] permissions: contents: read @@ -26,4 +26,17 @@ jobs: go-version: ${{ matrix.go }} - name: run go test - run: go test -v -p 1 ./... + run: | + go test -v -p 1 -coverprofile=cover -covermode=atomic -coverpkg=./... ./... + cp cover cover.out + + - name: Store coverage file + uses: actions/upload-artifact@v4 + with: + name: cover.out + path: cover.out + + coverage: + name: coverage + needs: go-test-windows + uses: senzing-factory/build-resources/.github/workflows/go-coverage.yaml@v2 diff --git a/.github/workflows/gofmt.yaml b/.github/workflows/gofmt.yaml deleted file mode 100644 index 54b4e5a..0000000 --- a/.github/workflows/gofmt.yaml +++ /dev/null @@ -1,12 +0,0 @@ -name: gofmt - -on: - pull_request: - branches: [main] - -permissions: - contents: read - -jobs: - gofmt: - uses: senzing-factory/build-resources/.github/workflows/gofmt.yaml@v2 diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml new file mode 100644 index 0000000..bffb573 --- /dev/null +++ b/.github/workflows/golangci-lint.yaml @@ -0,0 +1,36 @@ +name: golangci-lint + +on: + push: + branches-ignore: [main] + pull_request: + branches: [main] + +permissions: + # Required: allow read access to the content for analysis. + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + pull-requests: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + + steps: + - name: checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: setup go + uses: actions/setup-go@v5 + with: + go-version: 1.21 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + args: --config=${{ github.workspace }}/.github/linters/.golangci.yml + only-new-issues: false + version: latest diff --git a/.github/workflows/gosec.yaml b/.github/workflows/gosec.yaml deleted file mode 100644 index 44ccbb7..0000000 --- a/.github/workflows/gosec.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: gosec - -on: - push: - branches: - - main - pull_request: - branches: - - main - -permissions: - contents: read - -jobs: - gosec: - runs-on: ubuntu-latest - env: - GO111MODULE: on - - steps: - - name: checkout repository - uses: actions/checkout@v4 - - - name: run Gosec Security Scanner - uses: securego/gosec@master - with: - args: ./... diff --git a/.testcoverage.yml b/.testcoverage.yml new file mode 100644 index 0000000..19d5c8e --- /dev/null +++ b/.testcoverage.yml @@ -0,0 +1,49 @@ +# (mandatory) +# Path to coverprofile file (output of `go test -coverprofile` command). +# +# For cases where there are many coverage profiles, such as when running +# unit tests and integration tests separately, you can combine all those +# profiles into one. In this case, the profile should have a comma-separated list +# of profile files, e.g., 'cover_unit.out,cover_integration.out'. +profile: cover.out + +# (optional; but recommended to set) +# When specified reported file paths will not contain local prefix in the output +local-prefix: "github.com/org/project" + +# Holds coverage thresholds percentages, values should be in range [0-100] +threshold: + # (optional; default 0) + # The minimum coverage that each file should have + file: 70 + + # (optional; default 0) + # The minimum coverage that each package should have + package: 70 + + # (optional; default 0) + # The minimum total coverage project should have + total: 70 +# Holds regexp rules which will override thresholds for matched files or packages +# using their paths. +# +# First rule from this list that matches file or package is going to apply +# new threshold to it. If project has multiple rules that match same path, +# override rules should be listed in order from specific to more general rules. +#override: +# Increase coverage threshold to 100% for `foo` package +# (default is 80, as configured above in this example) +#- threshold: 100 +# path: ^pkg/lib/foo$ + +# Holds regexp rules which will exclude matched files or packages +# from coverage statistics +#exclude: +# Exclude files or packages matching their paths +#paths: +# - \.pb\.go$ # excludes all protobuf generated files +# - ^pkg/bar # exclude package `pkg/bar` + +# NOTES: +# - symbol `/` in all path regexps will be replaced by current OS file path separator +# to properly work on Windows diff --git a/Makefile b/Makefile index b03deb3..3d78d8f 100644 --- a/Makefile +++ b/Makefile @@ -32,9 +32,10 @@ GO_ARCH = $(word 2, $(GO_OSARCH)) # Conditional assignment. ('?=') # Can be overridden with "export" -# Example: "export LD_LIBRARY_PATH=/path/to/my/senzing/g2/lib" +# Example: "export LD_LIBRARY_PATH=/path/to/my/senzing-garage/g2/lib" LD_LIBRARY_PATH ?= /opt/senzing/g2/lib +GOBIN ?= $(shell go env GOPATH)/bin # Export environment variables. @@ -62,6 +63,12 @@ hello-world: hello-world-osarch-specific # Dependency management # ----------------------------------------------------------------------------- +.PHONY: make-dependencies +make-dependencies: + @go install github.com/vladopajic/go-test-coverage/v2@latest + @curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.58.1 + + .PHONY: dependencies dependencies: @go get -u ./... @@ -117,6 +124,28 @@ docker-build: .PHONY: test test: test-osarch-specific +# ----------------------------------------------------------------------------- +# Coverage +# ----------------------------------------------------------------------------- + +.PHONY: coverage +coverage: coverage-osarch-specific + + +.PHONY: check-coverage +check-coverage: export SENZING_LOG_LEVEL=TRACE +check-coverage: + go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./... + ${GOBIN}/go-test-coverage --config=./.testcoverage.yml + +# ----------------------------------------------------------------------------- +# Lint +# ----------------------------------------------------------------------------- + +.PHONY: run-golangci-lint +run-golangci-lint: + ${GOBIN}/golangci-lint run --config=.github/linters/.golangci.yml + # ----------------------------------------------------------------------------- # Run # ----------------------------------------------------------------------------- diff --git a/go.mod b/go.mod index 640ae3f..48a0221 100644 --- a/go.mod +++ b/go.mod @@ -3,8 +3,8 @@ module github.com/senzing-garage/observe go 1.21 require ( - github.com/senzing-garage/go-cmdhelping v0.2.1 - github.com/senzing-garage/go-observing v0.3.1 + github.com/senzing-garage/go-cmdhelping v0.2.2 + github.com/senzing-garage/go-observing v0.3.2 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.19.0 google.golang.org/grpc v1.64.0 @@ -19,7 +19,7 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/locafero v0.6.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect @@ -27,12 +27,12 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.6.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect - golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae // indirect - google.golang.org/protobuf v1.34.1 // indirect + golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/net v0.26.0 // indirect + golang.org/x/sys v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index a5cc889..4b83d91 100644 --- a/go.sum +++ b/go.sum @@ -32,14 +32,14 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= -github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk= +github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/senzing-garage/go-cmdhelping v0.2.1 h1:F40uSBtxP03/5aXAUW9C5kMuCFj8lFvmvDlJDvAq9qE= -github.com/senzing-garage/go-cmdhelping v0.2.1/go.mod h1:76FIsPpEWQrsY7DLR5f/I0bi5UB43KfmDd7b1jBfot8= -github.com/senzing-garage/go-observing v0.3.1 h1:EGqe+Uix8VNQ9HCwm5xZkAF0hGoHaC1URAaT/5FW37A= -github.com/senzing-garage/go-observing v0.3.1/go.mod h1:x60vlRIR0ZdJrHDuK82nzmQG4sN0G6oqdLE9vQl9pVc= +github.com/senzing-garage/go-cmdhelping v0.2.2 h1:2DE6uapQuoHodlOu6dFEspo8RNwhEkMZrb9azo+6uiw= +github.com/senzing-garage/go-cmdhelping v0.2.2/go.mod h1:cE/9aV+4NizpnduntqbjGBmRS1+VAGn9oTR0yybgeko= +github.com/senzing-garage/go-observing v0.3.2 h1:jXW5u656aZywe/UEUi7ga7nieBSW4CUO8YKvpNNAFMQ= +github.com/senzing-garage/go-observing v0.3.2/go.mod h1:5yHCwaaIrwX81JOghAL/1Q1V8eF7SQhyBBdhTb7+rgY= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= @@ -65,20 +65,20 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8 github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 h1:vr/HnozRka3pE4EsMEg1lgkXJkTFJCVUX+S/ZT6wYzM= -golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842/go.mod h1:XtvwrStGgqGPLc4cjQfWqZHG1YFdYs6swckp8vpsjnc= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae h1:c55+MER4zkBS14uJhSZMGGmya0yJx5iHV4x/fpOSNRk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240506185236-b8a5c65736ae/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= +golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3 h1:9Xyg6I9IWQZhRVfCWjKK+l6kI0jHcPesVlMnT//aHNo= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240610135401-a8a62080eff3/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= diff --git a/makefiles/darwin.mk b/makefiles/darwin.mk index 74bf170..ee0e4ed 100644 --- a/makefiles/darwin.mk +++ b/makefiles/darwin.mk @@ -20,10 +20,19 @@ build-osarch-specific: darwin/amd64 .PHONY: clean-osarch-specific clean-osarch-specific: - @docker rm --force $(DOCKER_CONTAINER_NAME) 2> /dev/null || true + @docker rm --force $(DOCKER_CONTAINER_NAME) 2> /dev/null || true @docker rmi --force $(DOCKER_IMAGE_NAME) $(DOCKER_BUILD_IMAGE_NAME) 2> /dev/null || true - @rm -rf $(TARGET_DIRECTORY) || true - @rm -f $(GOPATH)/bin/$(PROGRAM_NAME) || true + @rm -f $(GOPATH)/bin/$(PROGRAM_NAME) || true + @rm -f $(MAKEFILE_DIRECTORY)/coverage.html || true + @rm -f $(MAKEFILE_DIRECTORY)/coverage.out || true + @rm -fr $(TARGET_DIRECTORY) || true + + +.PHONY: coverage-osarch-specific +coverage-osarch-specific: + @go test -v -coverprofile=coverage.out -p 1 ./... + @go tool cover -html="coverage.out" -o coverage.html + @open file://$(MAKEFILE_DIRECTORY)/coverage.html .PHONY: hello-world-osarch-specific diff --git a/makefiles/linux.mk b/makefiles/linux.mk index 71267ac..ad7a3ad 100644 --- a/makefiles/linux.mk +++ b/makefiles/linux.mk @@ -15,10 +15,20 @@ build-osarch-specific: linux/amd64 .PHONY: clean-osarch-specific clean-osarch-specific: - @docker rm --force $(DOCKER_CONTAINER_NAME) 2> /dev/null || true + @docker rm --force $(DOCKER_CONTAINER_NAME) 2> /dev/null || true @docker rmi --force $(DOCKER_IMAGE_NAME) $(DOCKER_BUILD_IMAGE_NAME) 2> /dev/null || true - @rm -rf $(TARGET_DIRECTORY) || true - @rm -f $(GOPATH)/bin/$(PROGRAM_NAME) || true + @rm -f $(GOPATH)/bin/$(PROGRAM_NAME) || true + @rm -f $(MAKEFILE_DIRECTORY)/coverage.html || true + @rm -f $(MAKEFILE_DIRECTORY)/coverage.out || true + @rm -fr $(TARGET_DIRECTORY) || true + + +.PHONY: coverage-osarch-specific +coverage-osarch-specific: export SENZING_LOG_LEVEL=TRACE +coverage-osarch-specific: + @go test -v -coverprofile=coverage.out -p 1 ./... + @go tool cover -html="coverage.out" -o coverage.html + @xdg-open $(MAKEFILE_DIRECTORY)/coverage.html .PHONY: hello-world-osarch-specific diff --git a/makefiles/windows.mk b/makefiles/windows.mk index 4c8215f..88576fa 100644 --- a/makefiles/windows.mk +++ b/makefiles/windows.mk @@ -16,8 +16,17 @@ build-osarch-specific: windows/amd64 .PHONY: clean-osarch-specific clean-osarch-specific: - del /F /S /Q $(TARGET_DIRECTORY) del /F /S /Q $(GOPATH)/bin/$(PROGRAM_NAME) + del /F /S /Q $(MAKEFILE_DIRECTORY)/coverage.html + del /F /S /Q $(MAKEFILE_DIRECTORY)/coverage.out + del /F /S /Q $(TARGET_DIRECTORY) + + +.PHONY: coverage-osarch-specific +coverage-osarch-specific: + @go test -v -coverprofile=coverage.out -p 1 ./... + @go tool cover -html="coverage.out" -o coverage.html + @xdg-open file://$(MAKEFILE_DIRECTORY)/coverage.html .PHONY: hello-world-osarch-specific