PureXML/docs/rules/rules-swift/.pre-commit-config.yaml

28 lines
925 B
YAML

# pre-commit framework configuration. https://pre-commit.com
# Install once per clone:
# pip install pre-commit
# pre-commit install
# pre-commit install --hook-type commit-msg
# These run the locally installed SwiftFormat and SwiftLint, so there are no tool
# versions to pin here; pin them through your toolchain instead.
repos:
- repo: local
hooks:
- id: swiftformat
name: SwiftFormat
entry: swiftformat --lint --config .swiftformat .
language: system
types: [swift]
pass_filenames: false
- id: swiftlint
name: SwiftLint
entry: swiftlint --config .swiftlint.yml --strict
language: system
types: [swift]
pass_filenames: false
- id: commit-message-checks
name: No tool attribution or em dashes in the commit message
entry: .githooks/commit-msg
language: script
stages: [commit-msg]