realm/SwiftLint: A tool to enforce Swift style and conventions.
What you can see in this article
trailing_whitespace
that is displayed a lot in SwiftlintHomebrew
brew install swiftlint
Package Manager for macOS (or Linux) — Homebrew
Add the following to Run Phases as shown on the Official Page.
if which swiftlint >/dev/null; then
swiftlint
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
A lot of warnings are coming out!
By inserting swiftlint
There are now a lot of trailing_whitespace
warnings.
It seems to happen when there is a space in a blank line, but it is troublesome to erase the space when each line is open.
Check Preference> TextEditing> Editing> ʻIncluding whitespace-only lines` to eliminate this.
If you apply this, the blank space will be erased without permission.
norio-nomura/action-swiftlint: GitHub Action for SwiftLint I used this.
swiftlint
with brewRun Phases
!There are many other ways to do it realm / SwiftLint: A tool to enforce Swift style and conventions. Please check.
Recommended Posts