Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action][swiftlint] Adds '--progress' flag #21922

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ObjectiveCesar
Copy link

@ObjectiveCesar ObjectiveCesar commented Mar 13, 2024

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

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 is false to not introduce a different behaviour to previous fastlane versions.

Testing Steps

  1. Clone the repo, checkout the PR branch
  2. CD into the directory and execute bundle install and/or bundle update (You should have installed bundler already)
  3. CD into you project and edit your projects Gemfile to use gemspec 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.
  4. Execute bundle exec fastlane run swiftlint progress:true to see how it works.

@ObjectiveCesar
Copy link
Author

I'm not quite sure why most of the CircleCI tasks fail due to permission issues. Maybe somebody can advise me what to do here?

@ObjectiveCesar
Copy link
Author

I'm not quite sure why most of the CircleCI tasks fail due to permission issues. Maybe somebody can advise me what to do here?

I guess, I needed to use the original Gemfile.lock.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant