From f980ccc0e30cf6f146f0bbf9b85f8785fe1b7387 Mon Sep 17 00:00:00 2001 From: Divyesh Canopas <83937721+cp-divyesh-v@users.noreply.github.com> Date: Thu, 26 Dec 2024 11:17:28 +0530 Subject: [PATCH] integrated precomit hooks (#73) --- .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