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

cmd/info: refactor-github_info #10249

Merged
merged 1 commit into from Jan 8, 2021

Conversation

hyuraku
Copy link
Contributor

@hyuraku hyuraku commented Jan 7, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

refactor def github_info in cmd/info because if statement is hard to read.

f.path
end
else
if f.tap.nil? && f.tap&.remote.nil?
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't make sense; if f.tap.nil? then f.tap&.remote is a pointless check because it'll always be nil too. I'd suggest keeping the ordering the same (rather than flipping the if/else) and, if better, use an early return.

@hyuraku hyuraku force-pushed the cmd/info_refactor-github_info branch from 9d97313 to 45e95f4 Compare January 7, 2021 14:17
@hyuraku hyuraku force-pushed the cmd/info_refactor-github_info branch from 45e95f4 to d2c0fdf Compare January 7, 2021 15:14
@MikeMcQuaid
Copy link
Member

Thanks again @hyuraku!

@MikeMcQuaid MikeMcQuaid merged commit 7176870 into Homebrew:master Jan 8, 2021
@hyuraku hyuraku deleted the cmd/info_refactor-github_info branch January 18, 2021 14:30
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Feb 18, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Feb 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants