I have a workspace with multiple sibling projects that I maintain in a single workspace.
I have set up a run script phase for the target of every project.
Is there a way to avoid swapping targets and building for every target to see the SwiftLint warnings for that target? I would like to build for a single target and see SwiftLint warnings across all of my projects/targets.
note to self: maybe there is a way to specify multiple paths to run swiftlint on - in that case only one project would need to have the run script which could run the lint command on all projects. Or maybe even just specify one path to run on but specify the path of the parent directory of the project.
I created https://github.com/norio-nomura/ExtraBuildPhase as Xcode plugin for such purpose.
But, we can't use that with Xcode 8 anymore.
My solution that seems to work fine is to pick whichever target I will normally be building and only put the run script for that target, but make the run script specify the --path to be one directory up.
swiftlint lint --path "$SRCROOT"/..
Most helpful comment
My solution that seems to work fine is to pick whichever target I will normally be building and only put the run script for that target, but make the run script specify the --path to be one directory up.
swiftlint lint --path "$SRCROOT"/..