瀏覽代碼

Merge pull request #2470 from mattray/justfile

Add 'go vet' to testing
Matt Ray 2 年之前
父節點
當前提交
d584dda1c1
共有 2 個文件被更改,包括 7 次插入0 次删除
  1. 6 0
      CONTRIBUTING.md
  2. 1 0
      justfile

+ 6 - 0
CONTRIBUTING.md

@@ -89,6 +89,12 @@ An example of the full command:
 PROMETHEUS_SERVER_ENDPOINT="http://127.0.0.1:9090" go run main.go
 ```
 
+## Testing code
+
+Testing is provided by the `just test` command which runs
+- [go test](https://go.dev/doc/tutorial/add-a-test) unit tests
+- [go vet](https://pkg.go.dev/cmd/vet) code quality checks
+
 ## Running the integration tests
 
 To run these tests:

+ 1 - 0
justfile

@@ -9,6 +9,7 @@ default:
 # Run unit tests
 test:
     {{commonenv}} go test ./... -coverprofile=coverage.out
+    {{commonenv}} go vet ./...
 
 # Compile a local binary
 build-local: