ashfurrow / danger-ruby-swiftlint

A Danger plugin for SwiftLint.
https://rubygems.org/gems/danger-swiftlint
MIT License
203 stars 81 forks source link

Convert from using --path to using --use-script-input-files #135

Closed kylefleming closed 5 years ago

kylefleming commented 5 years ago

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)

ashfurrow commented 5 years ago

Okay, that's released as 0.23.0 👍