Closed drekka closed 2 years ago
It’s not a goal of SwiftLint to compile fast enough that it can be compiled in a build phase. Typically, you would run a precompiled version of SwiftLint in this case.
Hmmm. The build is Xcode and we want SwiftLint to run for developers so it's a build phase. But when this is run on CI it has to download/install SwiftLint first. So how do we achieve this?
I recommend using a pre-compiled version if speed is important: either hosting the binary yourself, downloading from GitHub releases, using Homebrew, etc
New Issue Checklist
Describe the bug
When using
swift build ...
during a build phase, SwiftLint takes a really long time to build.I'm following to add SwiftLint to a project using SPM along with Rswift and SwiftFormat tools.
RSwift and SwiftFormat are relatively quick to build their command line executables where as SwiftLint takes it least 10 times longer. Mostly it would appear, in building dependencies such as SourceKitten.
Basically I'm using the script:
Is there anyway to speed up building? On a fresh checkout it's taking minutes and even on a rebuild SwiftLint still takes at least 60 seconds build.