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] Added format option to swiftlint action #14643

Merged
merged 4 commits into from
May 3, 2019
Merged

[action] Added format option to swiftlint action #14643

merged 4 commits into from
May 3, 2019

Conversation

bguidolim
Copy link
Contributor

@bguidolim bguidolim commented Apr 23, 2019

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've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

This PR adds the option format to swiftlint action.

Description

The option is only available for mode autocorrect, it formats the code besides the changes regarding the rules. If the mode is set to lint, then the option has no effect.

@janpio janpio changed the title Added format option to swiftlint action [action] Added format option to swiftlint action Apr 23, 2019
Copy link
Collaborator

@giginet giginet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

I pointed a few. Please check it out

optional: true)
optional: true),
FastlaneCore::ConfigItem.new(key: :format,
description: "Format code when mode is :autocorrect",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent 👀

optional: true),
FastlaneCore::ConfigItem.new(key: :format,
description: "Format code when mode is :autocorrect",
default_value: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can specify type: Boolean,.

fastlane has Boolean type.

fastlane/spec/actions_specs/swiftlint_spec.rb Show resolved Hide resolved
expect(result).to eq("swiftlint lint")
end

it "omits the switch if swiftlint version is too low" do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too earlier? (I'm not a native speaker)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not right, but I basically copied and pasted. I'm gonna change this.

fastlane/spec/actions_specs/swiftlint_spec.rb Show resolved Hide resolved
@googlebot
Copy link

So there's good news and bad news.

👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there.

😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request.

Note to project maintainer: This is a terminal state, meaning the cla/google commit status will not change from this state. It's up to you to confirm consent of all the commit author(s), set the cla label to yes (if enabled on your project), and then merge this pull request when appropriate.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no and removed cla: yes labels May 3, 2019
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bguidolim This is 💯! Thanks for the contribution ❤️

@joshdholtz joshdholtz merged commit c47ee48 into fastlane:master May 3, 2019
@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.122.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Jul 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants