summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorDan Duvall <dduvall@wikimedia.org>2018-07-31 16:43:05 -0700
committerDan Duvall <dduvall@wikimedia.org>2018-08-01 10:05:08 -0700
commit44dc7d91313ee36aed1b85ae7f63c9e75ab78ff3 (patch)
treefa2a0c8fd0850a5d9ad91c6ae860d8cfd43ee4a1 /CONTRIBUTING.md
parent80936122c749199bb9a376a23ae85e45c4abebe0 (diff)
downloadblubber-44dc7d91313ee36aed1b85ae7f63c9e75ab78ff3.tar.gz
Provide Makefile rules for running linters and tests
With the move to Gerrit and away from Phabricator/Arcanist, we lost an easy way to run linters. New rules have been added to the `Makefile`, `lint`, `unit`, and `test` that run linters, unit tests, and both linters and unit tests, respectively. Bug: T200452 Change-Id: I0742daaa14389841d88f13eba47dee07ac127cf2
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md13
1 files changed, 8 insertions, 5 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 57d01c2..d9214a2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -60,14 +60,17 @@ If you do update `Gopkg.toml` to add, update, or remove a dependency, simply
run `dep ensure && dep prune` after doing so, and commit the resulting
`vendor` directory changes.
-## Running tests
+## Running tests and linters
Tests and linters for packages/files you've changed will automatically run
-when you submit your changes to Gerrit for review. You can also run tests
-locally by running `go test`.
+when you submit your changes to Gerrit for review. You can also run them
+locally using the `Makefile`:
- go test ./... # for everything, or
- go test -run TestFuncName ./... # to run a single test
+ make lint # to run all linters
+ make unit # or all unit tests
+ make test # or all linters and unit tests
+
+ go test -run TestFuncName ./... # to run a single test function
## Getting your changes reviewed and merged