Example SPM Project With SwiftLint
How to implement it in your project
Package.swiftfile to see how to add SwiftLint to your Swift package.
Plugins/SwiftLintXcode/plugin.swiftfile to your project.
Done! Build your package with Xcode and SwiftLint will display warnings and errors in Xcode.
This is the only way I was able to get it working in Xcode 13.3. Ideally, the plugin itself could be declared in some shared repository that everyone could use, so they wouldn’t need to manually add swiftlint binary checksums or implement the plugin. However, I wasn’t able to get that working.