Skip to content

Commit dacf9d6

Browse files
committed
update README.md: golangci-lint support
1 parent 88fabab commit dacf9d6

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,49 @@
11
# tparallel
2+
23
[![tparallel](https://github.com/moricho/tparallel/workflows/tparallel/badge.svg?branch=master)](https://github.com/moricho/tparallel/actions)
34
[![Go Report Card](https://goreportcard.com/badge/github.com/moricho/tparallel)](https://goreportcard.com/report/github.com/moricho/tparallel)
45
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
56

67
`tparallel` finds inappropriate usage of `t.Parallel()` method in your Go test codes.
7-
It detects the following:
8+
It detects the following:
9+
810
- `t.Parallel()` is called in either a top-level test function or a sub-test function only
911
- Although `t.Parallel()` is called in the sub-test function, it is post-processed by `defer` instead of `t.Cleanup()`
10-
11-
This tool was inspired by this blog: [Go言語でのテストの並列化 〜t.Parallel()メソッドを理解する〜](https://engineering.mercari.com/blog/entry/how_to_use_t_parallel/)
12+
13+
This tool was inspired by this blog: [Go 言語でのテストの並列化 〜t.Parallel()メソッドを理解する〜](https://engineering.mercari.com/blog/entry/how_to_use_t_parallel/)
1214

1315
## Installation
1416

1517
### From GitHub Releases
18+
1619
Please see [GitHub Releases](https://github.com/moricho/tparallel/releases).
1720
Available binaries are:
21+
1822
- macOS
1923
- Linux
2024
- Windows
2125

2226
### macOS
23-
``` sh
27+
28+
```sh
2429
$ brew tap moricho/tparallel
2530
$ brew install tparallel
2631
```
2732

2833
### go get
34+
2935
```sh
3036
$ go get -u github.com/moricho/tparallel/cmd/tparallel
3137
```
3238

3339
## Usage
3440

41+
### golangci-lint
42+
43+
[golangci-lint](https://github.com/golangci/golangci-lint) now supports `tparallel`, so you can enable this linter and use in it.
44+
45+
### shell
46+
3547
```sh
3648
$ go vet -vettool=`which tparallel` <pkgname>
3749
```

0 commit comments

Comments
 (0)