[action][swiftlint] Adds '--progress' flag #21922
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validci/circleci
builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)Motivation and Context
I think it is a good idea to support the full feature set of a used tool, in this case SwiftLint, inside the fastlane actions. This pull request is a contribution to achieve that goal.
The newly introduced flag
--progress
of SwiftLint helps to reduce clutter from the console output. The output is reduced to SwiftLint violations only which makes it much easier to find those inside a console log be it on a local machine or on a CI.Description
I added a new accepted optional argument to the fastlane action 'swiftlint' that will add the '--progress' flag to the SwiftLint command if passed by the action with
true
. If the--progress
flag is not supported by the current SwiftLint version (first introduced with 0.49.1) the action argument will be ignored. The default value for that argument isfalse
to not introduce a different behaviour to previous fastlane versions.Testing Steps
bundle install
and/orbundle update
(You should have installedbundler
already)Gemfile
to usegemspec path: File.expand_path("<PATH_TO_LOCAL_FASTLANE>") instead of
gem fastlane`; replacing <PATH_TO_LOCAL_FASTLANE> with the path where you have the local fastlane repo.bundle exec fastlane run swiftlint progress:true
to see how it works.