Closed mstanzianoinsulet closed 3 months ago
I think that configuration files cannot be read from places outside of the project structure due to Xcode executing plugins in a sandboxed environment.
But I'm not expert here, admittedly. @garricn, @tinder-cfuller: Can you help out?
In this case, included
is for including Swift files, not configuration files. @SimplyDanny is correct though, the plugin relies on the inputFiles
it is provided and passes those as arguments to the executable invocation.
And it makes sense that when paths are passed as arguments to the executable, it then ignores the included
option.
The reason the plugin uses the inputFiles
is that these are the files that belong to the target being built. So from the plugin perspective these are the only files that would need to be linted.
@mstanzianoinsulet The next release of SwiftLint includes improvements to the build plugin and now also includes a command plugin too. The command plugin could be used for your setup since I see no reason why it would not respect the included
option (it is not provided with inputFiles
for example).
#4758 - Use BUILD_WORKSPACE_DIRECTORY in SwiftLintPlugin #5497 - Introduce SwiftLintCommandPlugin
Thank you so much @tinder-cfuller & @SimplyDanny 👍 I'm going to close this and see what I can do with the new implementation.
New Issue Checklist
Describe the bug
I've recently switched to using the SwiftLint Build Tool Plugin and noticed that it does not appear to honor the
included
configuration within.swiftlint.yml
. I have 1.swiftlint.yml
in the main App target directory, and it includes other directories that live at the same level - referenced as shown in the example below.Is this expected to work? Or is it a limitation of using the Build Tool Plugin?
Environment
d9c68882877d85901188cc6153a8b3651a014f8f
xcodebuild -version
)? 15.0