Skip to content

Instantly share code, notes, and snippets.

@willwfsp
Last active January 19, 2024 20:30
Show Gist options
  • Save willwfsp/37a900373a830503e3f535d8afd7b742 to your computer and use it in GitHub Desktop.
Save willwfsp/37a900373a830503e3f535d8afd7b742 to your computer and use it in GitHub Desktop.
Lint on pre-commit
#!/bin/sh
# Note:
# 1. Make sure you have SwiftLint installed and available in your system's PATH.
# Important:
# Remember to customize the script to suit your specific project needs, such as providing the correct
# paths to 'swiftlint'.
# Execute SwiftLint with --fix to automatically fix some of the linting issues.
swiftlint --fix
# Execute SwiftLint with --strict to thoroughly check the Swift code against all defined rules.
swiftlint lint --strict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment