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

feat: Apply Google style recommendations #1057

Merged
merged 1 commit into from Sep 14, 2022
Merged

Conversation

bpcreech
Copy link
Contributor

@bpcreech bpcreech commented Sep 7, 2022

This is a speculative PR just to show losalex@, will add issue if it seems like a good idea.

Fixes #TODO

Things our formatter does to this codebase:

  1. Add { } consistently after if statements. No one-liners-without-curlies allowed.
  2. Group overloaded methods together
  3. lowerCamelCase variables (e_name -> eName)
  4. UPPER_SNAKE_CASE enums ~Label.ClusterName -> Label.CLUSTER_NAME). This would be a breaking change if the enum were intended to be public. I think Label's not supposed to be (altho it is protected so it could be...). I had to change the clirr allowlist for this!. Resource is definitely private tho. Update: reverted the Label change because it's potentially breaking, but kept the Resource change.
  5. Test methods in the form lowerSnakeCaseOfSystemUnderTest_lowerSnakeCaseOfExpectedBehavior
  6. Don't do static import on classes (import static com.google.cloud.logging.Logging.TailOption).
  7. Each top-level class gets its own file (ResourceTypeEnvironmentGetterImpl)

@bpcreech bpcreech requested review from a team as code owners September 7, 2022 23:45
@product-auto-label product-auto-label bot added size: l Pull request size is large. api: logging Issues related to the googleapis/java-logging API. labels Sep 7, 2022
Copy link
Contributor

@losalex losalex left a comment

Choose a reason for hiding this comment

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

In general, this looks good - thanks for your effort @bpcreech!
I just had one concern about changing labels - please take a look and let me know WDYT

@losalex losalex self-assigned this Sep 9, 2022
@bpcreech bpcreech changed the title Apply Google style recommendations fix: Apply Google style recommendations Sep 11, 2022
@conventional-commit-lint-gcf
Copy link

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@bpcreech bpcreech changed the title fix: Apply Google style recommendations feat: Apply Google style recommendations Sep 11, 2022
@losalex losalex added the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 12, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Sep 12, 2022
@losalex losalex added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 13, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Sep 13, 2022
@losalex losalex merged commit bfef3d1 into googleapis:main Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/java-logging API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants