Skip to content

Commit

Permalink
Avoid using SwiftLint via Mint (#1059)
Browse files Browse the repository at this point in the history
  • Loading branch information
waliid authored Nov 5, 2024
1 parent f826b77 commit 2668aa6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ clean-imports:
@echo "Cleaning imports..."
@mkdir -p .build
@xcodebuild -scheme Pillarbox -destination generic/platform=ios > ./.build/xcodebuild.log
@mint run swiftlint analyze --fix --compiler-log-path ./.build/xcodebuild.log
@swiftlint analyze --fix --compiler-log-path ./.build/xcodebuild.log
@xcodebuild -scheme Pillarbox-demo -project ./Demo/Pillarbox-demo.xcodeproj -destination generic/platform=iOS > ./.build/xcodebuild.log
@mint run swiftlint analyze --fix --compiler-log-path ./.build/xcodebuild.log
@swiftlint analyze --fix --compiler-log-path ./.build/xcodebuild.log
@echo "... done.\n"

.PHONY: find-dead-code
Expand Down
1 change: 0 additions & 1 deletion Mintfile

This file was deleted.

4 changes: 2 additions & 2 deletions Scripts/check-quality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -e

echo "... checking Swift code..."
if [ $# -eq 0 ]; then
mint run swiftlint --quiet --strict
swiftlint --quiet --strict
elif [[ "$1" == "only-changes" ]]; then
git diff --staged --name-only | grep ".swift$" | xargs mint run swiftlint --quiet --strict
git diff --staged --name-only | grep ".swift$" | xargs swiftlint lint --quiet --strict
fi
echo "... checking Ruby scripts..."
bundle exec rubocop --format quiet
Expand Down
2 changes: 1 addition & 1 deletion Scripts/fix-quality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

set -e

mint run swiftlint --fix && mint run swiftlint
swiftlint --fix && swiftlint
2 changes: 1 addition & 1 deletion docs/CONTINUOUS_INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ The continuous integration agents must have the following tools installed:
- [bundler](https://bundler.io)
- [ffmpeg](https://ffmpeg.org)
- [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)
- [mint](https://github.com/yonaskolb/Mint)
- [shellcheck](https://www.shellcheck.net)
- [swiftlint](https://github.com/realm/SwiftLint)
- [xcodes](https://github.com/RobotsAndPencils/xcodes)
- [yamllint](https://github.com/adrienverge/yamllint)

Expand Down
2 changes: 1 addition & 1 deletion docs/DEVELOPMENT_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ The following tools are required for the best possible development experience:
- [ffmpeg](https://ffmpeg.org)
- [gem](https://rubygems.org)
- [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)
- [mint](https://github.com/yonaskolb/Mint)
- [Periphery](https://github.com/peripheryapp/periphery)
- [Python](https://www.python.org)
- [shellcheck](https://www.shellcheck.net)
- [swiftlint](https://github.com/realm/SwiftLint)
- [xcodes](https://github.com/RobotsAndPencils/xcodes)
- [yamllint](https://github.com/adrienverge/yamllint)

Expand Down
2 changes: 1 addition & 1 deletion hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Quality check
#================================================================

PATH="$(which mint):$(which ruby):$PATH"
PATH="$(which swiftlint):$(which ruby):$PATH"

if Scripts/check-quality.sh only-changes; then
echo "✅ Quality checked"
Expand Down

0 comments on commit 2668aa6

Please sign in to comment.