Skip to content

Fix fastlane action template warnings reported by Rubocop - #21310

Merged
getaaron merged 5 commits into
fastlane:masterfrom
bartoszkosiorek:rubocop
Jul 4, 2023
Merged

Fix fastlane action template warnings reported by Rubocop#21310
getaaron merged 5 commits into
fastlane:masterfrom
bartoszkosiorek:rubocop

Conversation

@bartoszkosiorek

@bartoszkosiorek bartoszkosiorek commented May 29, 2023

Copy link
Copy Markdown
Contributor

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.

Motivation and Context

When the new default action is created, the rubocop is complaing about wrong code style. The purpose of this PR is to fix the most easy to fix warnings, to improve user experience of end users (less warnings to fix).

Steps to introduce:

  1. Go to fastlane directory
  2. Create new custom action
 $ fastlane new_action
  1. setup rubocop
  2. Run rubocop

Description

With this PR, several trivial warnings were fixed: Layout/IndentationWidth, Style/StringLiterals, Style/MethodCallWithArgsParentheses, Layout/LineLength, Style/ParenthesesAroundCondition, Style/AndOr and Style/Not. As a result once developer create default action, it will have less updates to be complient with RuboCop.

@bartoszkosiorek bartoszkosiorek changed the title Fix two fastlane actions warnings reported by Rubocop Fix fastlane action template warnings reported by Rubocop May 29, 2023
@bartoszkosiorek
bartoszkosiorek force-pushed the rubocop branch 2 times, most recently from 6f515f4 to 945d12c Compare May 30, 2023 09:26
Fixes:
* Style/ParenthesesAroundCondition: Don't use parentheses around the condition of an unless.
* Style/AndOr: Use && instead of and.
* Style/Not: Use ! instead of not.
@getaaron

getaaron commented Jul 4, 2023

Copy link
Copy Markdown
Collaborator

Thanks for the PR, @bartoszkosiorek-tomtom !

@getaaron
getaaron merged commit e70b3d1 into fastlane:master Jul 4, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants