iOS/Project Related
coding convention - swiftLint -1
@서비
2022. 8. 26. 02:05
1. 설치
brew install swiftlint
2. xcode 세팅
프로젝트 선택 하고 Build Phases 에서 + 눌러서 Run Script 하시고, 아래 내용 추가
export PATH="$PATH:/opt/homebrew/bin"
if which swiftlint > /dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
3. 빌드
빌드를 해보면 이전과는 다르게 워닝이나 에러가 추가 된 것을 볼 수 있다.
기본적인 적용 과정은 이제 끝났다고 보면 되고, 이제 필요한 것과 아닌 것 등을 구분해서 적용 하면 될 거 같네요.
2022.08.30 - [iOS/Project Related] - coding convention - swiftLint -2
coding convention - swiftLint -2
우선은 기본적으로 적용되는 1) 룰을 둘러보고, 2) 추가 하거나 제외 할 룰을 생각해보고, 3) 제외할 파일을 생각해본다. Default Rules block_based_kvo: Block Based KVO : \ addObserver 형태가 아닌 블럭 형태..
iosdevhistory.tistory.com