44
55The Go linter ` paralleltest ` checks that the t.Parallel gets called for the test method and for the range of test cases within the test.
66
7+ ## Installation
8+
9+ ``` sh
10+ go install github.com/kunwardeep/paralleltest@latest
11+ ```
12+
713## Usage
814
915``` sh
@@ -16,6 +22,57 @@ A few options can be activated by flag:
1622* ` -ignoremissingsubtests ` : Require that top-level tests specify ` t.Parallel ` , but don't require it in subtests (` t.Run(...) ` ).
1723* ` -ignoreloopVar ` : Ignore loop variable detection.
1824
25+ ## Development
26+
27+ ### Prerequisites
28+
29+ - Go 1.23.0 or later
30+ - Make
31+
32+ ### Local Development
33+
34+ 1 . Clone the repository:
35+ ``` sh
36+ git clone https://github.com/kunwardeep/paralleltest.git
37+ cd paralleltest
38+ ```
39+
40+ 2 . Install development tools:
41+ ``` sh
42+ make install_devtools
43+ ```
44+
45+ 3 . Install dependencies:
46+ ``` sh
47+ make ensure_deps
48+ ```
49+
50+ 4 . Run tests:
51+ ``` sh
52+ make test
53+ ```
54+
55+ 5 . Run linter:
56+ ``` sh
57+ make lint
58+ ```
59+
60+ To fix linting issues automatically:
61+ ``` sh
62+ make lint_fix
63+ ```
64+
65+ ### CI/CD
66+
67+ The project uses GitHub Actions for continuous integration. The workflow includes:
68+
69+ - Running tests with race condition detection
70+ - Running golangci-lint for code quality checks
71+
72+ The workflow runs on:
73+ - Pull requests
74+ - Pushes to the main branch
75+
1976## Examples
2077
2178### Missing ` t.Parallel() ` in the test method
@@ -100,7 +157,6 @@ func TestFunctionRangeNotUsingRangeValueInTDotRun(t *testing.T) {
100157 }{{name: " foo" }}
101158 for _ , tc := range testCases {
102159 t.Run (tc.name , func (t *testing.T ) {
103- // ^ call to tc.name
104160 t.Parallel ()
105161 fmt.Println (tc.name )
106162 })
@@ -146,3 +202,15 @@ func TestFunctionRangeNotReInitialisingVariable(t *testing.T) {
146202// Error displayed
147203// Range statement for test TestFunctionRangeNotReInitialisingVariable does not reinitialise the variable tc
148204```
205+
206+ ## Contributing
207+
208+ 1 . Fork the repository
209+ 2 . Create your feature branch (` git checkout -b feature/amazing-feature ` )
210+ 3 . Commit your changes (` git commit -m 'Add some amazing feature' ` )
211+ 4 . Push to the branch (` git push origin feature/amazing-feature ` )
212+ 5 . Open a Pull Request
213+
214+ ## License
215+
216+ This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
0 commit comments