Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
repos:
- repo: local
hooks:
- id: ktlint-format
name: ktlint format
language: system
entry: ./gradlew ktlintFormat
pass_filenames: false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ktlintFormat と ktlintCheck でファイルパスを渡してそのファイルだけを処理させる方法がなさそうだったため、ファイル名は pass せずコマンド実行のみにしてます

files: \.(kt|kts)$
stages: [pre-commit]
- id: ktlint-check
name: ktlint check
language: system
entry: ./gradlew ktlintCheck
pass_filenames: false
files: \.(kt|kts)$
stages: [pre-commit]
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@

- [UPDATE] `Claude Assistant` の `claude-response` を `ubuntu-slim` に移行する
- @zztkm
- [ADD] pre-commit を導入する
- .pre-commit-config.yaml ファイルを追加する
- コミット時に `./gradlew ktlintFormat` と `./gradlew ktlintCheck` を実行するように設定する
- ツールは prek を利用することを前提とする
- https://github.com/j178/prek
- @zztkm


## 2025.3.0
Expand Down