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