From 1358789ac630024ee221c4d4139102b166038eb9 Mon Sep 17 00:00:00 2001 From: Divyesh Canopas Date: Thu, 26 Dec 2024 11:07:20 +0530 Subject: [PATCH] integrated precomit hooks --- .pre-commit-config.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6ed1e45 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +repos: + - repo: local + hooks: + - id: swiftformat + name: Swift Format + description: Enforces formatting guidelines for Swift files before committing. + language: system + entry: swiftformat --swiftversion 5 + stages: + - pre-commit + + - id: swiftlint + name: Swift Linter + description: Runs a linter before committing to ensure code quality. + language: system + always_run: true + entry: swiftlint lint --lenient --config .swiftlint.yml + stages: + - pre-commit