This converts from making a separate call to swiftlint for each file using --path to passing all files in at once using --use-script-input-files.
This is how danger/swift and fastlane/swiftlint do it and I believe it is the recommended way of linting specific files.
The biggest motivation for me for doing this is to allow nested configurations. Since passing a single file to swiftlint changes the "root folder" from the location of the main config file to the location of the swift file, swiftlint isn't able to traverse up the tree from the swift file up to the main config file looking for nested .swiftlint.yml files. By using --use-script-input-files instead of --path, swiftlint is able to find nested config files properly.
I suspect this change will have other benefits as well and could possibly have better performance.
This converts from making a separate call to swiftlint for each file using
--path
to passing all files in at once using--use-script-input-files
.This is how danger/swift and fastlane/swiftlint do it and I believe it is the recommended way of linting specific files.
The biggest motivation for me for doing this is to allow nested configurations. Since passing a single file to swiftlint changes the "root folder" from the location of the main config file to the location of the swift file, swiftlint isn't able to traverse up the tree from the swift file up to the main config file looking for nested
.swiftlint.yml
files. By using--use-script-input-files
instead of--path
, swiftlint is able to find nested config files properly.I suspect this change will have other benefits as well and could possibly have better performance.
Feel free to make or suggest any changes.
Closes #111 (and possibly related to #87)