mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-26 09:35:52 +00:00
- Configure SwiftLint with Swift 6 compatible rules - Disable conflicting self-related rules (implicit_self, redundant_self) - Set up SwiftFormat to avoid self-rewrite conflicts - Add custom rules for print statements and async/await patterns - Create lint script and GitHub Actions workflow - Add Package.swift for SPM dependencies - Ensure proper exclusions for build directories and tests
28 lines
No EOL
627 B
Bash
Executable file
28 lines
No EOL
627 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Swift linting and formatting script
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
PROJECT_ROOT="$( cd "$SCRIPT_DIR/.." && pwd )"
|
|
|
|
cd "$PROJECT_ROOT"
|
|
|
|
echo "Running SwiftFormat..."
|
|
if command -v swiftformat &> /dev/null; then
|
|
swiftformat . --verbose
|
|
else
|
|
echo "SwiftFormat not installed. Install with: brew install swiftformat"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Running SwiftLint..."
|
|
if command -v swiftlint &> /dev/null; then
|
|
swiftlint --fix
|
|
swiftlint
|
|
else
|
|
echo "SwiftLint not installed. Install with: brew install swiftlint"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ Linting complete!" |