Skip to content

Commit 298e1f4

Browse files
authored
Merge pull request #45 from kunwardeep/update-readme
update readme
2 parents e2a5792 + ca15161 commit 298e1f4

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

README.md

+69-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44

55
The 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

Comments
 (0)