Skip to content

Commit 5876f0f

Browse files
committed
split lint and format
1 parent 6c0e932 commit 5876f0f

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ check-all: ## Run all lint checks and unittest
55
@echo "[Notice] If you'd like to run commands with same env to CI, please run \`tox\`."
66
@bash ci.sh
77

8-
.PHONY: ruff
9-
ruff: ## Run ruff
8+
.PHONY: lint
9+
lint:
1010
python -m ruff check .
11+
12+
.PHONY: format
13+
format:
1114
python -m ruff format --check .
1215

1316
.PHONY: unittest

ci.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
EXIT_STATUS=0
44

5-
if ! make ruff ; then
6-
echo "Please run command 'make ruff' on your local and commit the result"
5+
if ! make lint ; then
6+
echo "Please run command 'make lint' on your local and commit the result"
7+
EXIT_STATUS=1
8+
fi
9+
if ! make format ; then
10+
echo "Please run command 'make format' on your local and commit the result"
711
EXIT_STATUS=1
812
fi
9-
1013
if ! make unittest ARGS=--junitxml=./test/unit/junit.xml ; then
1114
EXIT_STATUS=1
1215
fi

0 commit comments

Comments
 (0)