Closed kenji21 closed 3 years ago
Configuration decisions vary a lot by project, so I'd say it's up to the user to choose how to integrate SwiftLint in the way that fits their workflow better.
That's why my preferred solution is the first one : as I have no control over dependencies I want to "archive" when compiling them with Carthage, I can't be sure there take care not to "build fail" because rules of switflint newer than last dependency tag (which they can't know about and fix)
Having the same problem here, it's sad that an external tool (aka. Carthage) canot build a project for what should be considered as warning instead of errors. Throwing warnings instead of errors in Release configuration is not doable ? This behavior could be the default one and may be prevented by a command line argument ?
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
New Issue Checklist
Describe the bug
When building an old tag of a Framework using Carthage, the swiftlint script build phase can fail because some rules added after the tag matches in the tagged source code. Carthage uses
xcodebuild archive
and it sets the ACTION environment variable to "install".First option to solve this issue: swiftlint should skip linting (maybe with a warning) if ACTION environment variable equals to "install" (cf https://help.apple.com/xcode/mac/10.0/#/itcaec37c2a6)
Second option: patch the README to update the script of the "Run Script Phase" to lint only Debug builds as https://github.com/auth0/JWTDecode.swift do :
A temporary solution is to
brew uninstall swiftlint
before runningcarthage
and then reinstall it.Environment
swiftlint version
to be sure)? 0.27.0