File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change 1
1
# tparallel
2
+
2
3
[ ![ tparallel] ( https://github.com/moricho/tparallel/workflows/tparallel/badge.svg?branch=master )] ( https://github.com/moricho/tparallel/actions )
3
4
[ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/moricho/tparallel )] ( https://goreportcard.com/report/github.com/moricho/tparallel )
4
5
[ ![ MIT License] ( http://img.shields.io/badge/license-MIT-blue.svg?style=flat )] ( LICENSE )
5
6
6
7
` tparallel ` finds inappropriate usage of ` t.Parallel() ` method in your Go test codes.
7
- It detects the following:
8
+ It detects the following:
9
+
8
10
- ` t.Parallel() ` is called in either a top-level test function or a sub-test function only
9
11
- 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/ )
12
14
13
15
## Installation
14
16
15
17
### From GitHub Releases
18
+
16
19
Please see [ GitHub Releases] ( https://github.com/moricho/tparallel/releases ) .
17
20
Available binaries are:
21
+
18
22
- macOS
19
23
- Linux
20
24
- Windows
21
25
22
26
### macOS
23
- ``` sh
27
+
28
+ ``` sh
24
29
$ brew tap moricho/tparallel
25
30
$ brew install tparallel
26
31
```
27
32
28
33
### go get
34
+
29
35
``` sh
30
36
$ go get -u github.com/moricho/tparallel/cmd/tparallel
31
37
```
32
38
33
39
## Usage
34
40
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
+
35
47
``` sh
36
48
$ go vet -vettool=` which tparallel` < pkgname>
37
49
```
You can’t perform that action at this time.
0 commit comments