mirror of
https://github.com/Instagram/IGListKit
synced 2026-05-06 06:58:26 +00:00
Summary:
- Updates to SwiftLint 0.24.2
- Improve `scripts/lint.sh`
- pull version out to a var for easier maintenance
- better error message
- make script fail xcode build if not installed (so we don't commit lint errors)
- Adds a few new SwiftLint rules
- Correct all new lint errors (most can be done by running `swiftlint autocorrect`)
- Cleans up `.swiftlint.yml`
- Fix up example projects
Closes https://github.com/Instagram/IGListKit/pull/1058
Differential Revision: D6776177
Pulled By: rnystrom
fbshipit-source-id: 345172237b97aaed0d62312c8f366f46145f8cd9
14 lines
333 B
Bash
Executable file
14 lines
333 B
Bash
Executable file
#!/bin/bash
|
|
|
|
VERSION="0.24.2"
|
|
|
|
if which swiftlint >/dev/null && [ $(swiftlint version) == $VERSION ]; then
|
|
swiftlint lint --config ../.swiftlint.yml
|
|
else
|
|
echo "
|
|
Warning: SwiftLint $VERSION not installed!
|
|
Download from https://github.com/realm/SwiftLint,
|
|
or brew [install | upgrade] swiftlint.
|
|
"
|
|
exit 1
|
|
fi
|