From b5a34b5bcb52ff66320f5094256970859874767b Mon Sep 17 00:00:00 2001 From: naskya Date: Mon, 22 Jan 2024 02:11:22 +0900 Subject: [PATCH] dev: format the code in pre-commit --- Makefile | 7 ++++++- docs/contributing.md | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e7bceea38..680aa64d4 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ UPDATE_SCRIPTS += $(foreach dir, neko/update, $(wildcard $(dir)/*)) .PHONY: pre-commit -pre-commit: shellcheck update-lockfiles regenerate-entities neko/index.js rust-lint +pre-commit: format shellcheck update-lockfiles regenerate-entities neko/index.js rust-lint .PHONY: update-lockfiles @@ -53,6 +53,11 @@ $(T)/shellcheck: $(UPDATE_SCRIPTS) touch $@ +.PHONY: format +format: + pnpm run format + + .PHONY: rust-lint rust-lint: $(T)/rust-lint diff --git a/docs/contributing.md b/docs/contributing.md index 5409fc7a7..d0467b6df 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -57,7 +57,7 @@ make make run ``` -### lockfile や native-utils の entity の更新など(コミット前に行ってください) +### lockfile や native-utils の entity の更新やコードのフォーマットなど(コミット前に行ってください) ```bash make