Skip to content

Commit

Permalink
split lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Oct 10, 2024
1 parent 6c0e932 commit 5876f0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ check-all: ## Run all lint checks and unittest
@echo "[Notice] If you'd like to run commands with same env to CI, please run \`tox\`."
@bash ci.sh

.PHONY: ruff
ruff: ## Run ruff
.PHONY: lint
lint:
python -m ruff check .

.PHONY: format
format:
python -m ruff format --check .

.PHONY: unittest
Expand Down
9 changes: 6 additions & 3 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

EXIT_STATUS=0

if ! make ruff ; then
echo "Please run command 'make ruff' on your local and commit the result"
if ! make lint ; then
echo "Please run command 'make lint' on your local and commit the result"
EXIT_STATUS=1
fi
if ! make format ; then
echo "Please run command 'make format' on your local and commit the result"
EXIT_STATUS=1
fi

if ! make unittest ARGS=--junitxml=./test/unit/junit.xml ; then
EXIT_STATUS=1
fi
Expand Down

0 comments on commit 5876f0f

Please sign in to comment.