Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6358cd9

Browse files
authored
Add Makefile check rule to run all the linters and checkers (openai#1038)
It adds a Makefile rule `check` to run all linters and checkers in a single command. With only `make check` instead of 3-4 commands, it can help to forget one of them before pushing a PR.
1 parent e5ba91b commit 6358cd9

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ format:
77
uv run ruff format
88
uv run ruff check --fix
99

10+
.PHONY: format-check
11+
format-check:
12+
uv run ruff format --check
13+
1014
.PHONY: lint
1115
lint:
1216
uv run ruff check
@@ -55,5 +59,5 @@ serve-docs:
5559
deploy-docs:
5660
uv run mkdocs gh-deploy --force --verbose
5761

58-
59-
62+
.PHONY: check
63+
check: format-check lint mypy tests

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,10 +170,16 @@ make sync
170170

171171
2. (After making changes) lint/test
172172

173+
```
174+
make check # run tests linter and typechecker
175+
```
176+
177+
Or to run them individually:
173178
```
174179
make tests # run tests
175180
make mypy # run typechecker
176181
make lint # run linter
182+
make format-check # run style checker
177183
```
178184

179185
## Acknowledgements

0 commit comments

Comments
 (0)