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

chore: use Google Java Format to format Java code automaticlly by github action #4200

Closed

Conversation

Anilople
Copy link
Contributor

@Anilople Anilople commented Jan 8, 2022

What's the purpose of this PR

Auto format Java code when people push or pull request.

Which issue(s) this PR fixes:

Fixes #4196

Brief changelog

  • Add a workflow .github/workflows/google-java-format.yml

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.
  • Update the CHANGES log.

@Anilople Anilople added the chore Project chores such as CI settings, typos, etc. label Jan 8, 2022
@github-actions
Copy link

github-actions bot commented Jan 8, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@codecov-commenter
Copy link

codecov-commenter commented Jan 8, 2022

Codecov Report

Merging #4200 (16c62bc) into master (96ee53a) will increase coverage by 0.01%.
The diff coverage is n/a.

❗ Current head 16c62bc differs from pull request most recent head 1d73cc1. Consider uploading reports for the commit 1d73cc1 to get more accurate results
Impacted file tree graph

@@             Coverage Diff              @@
##             master    #4200      +/-   ##
============================================
+ Coverage     52.56%   52.58%   +0.01%     
- Complexity     2623     2625       +2     
============================================
  Files           484      484              
  Lines         15200    15200              
  Branches       1571     1571              
============================================
+ Hits           7990     7993       +3     
+ Misses         6651     6650       -1     
+ Partials        559      557       -2     
Impacted Files Coverage Δ
.../framework/apollo/spring/property/SpringValue.java 89.47% <0.00%> (+1.75%) ⬆️
...rk/apollo/spring/property/SpringValueRegistry.java 89.18% <0.00%> (+5.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 96ee53a...1d73cc1. Read the comment docs.

@Anilople
Copy link
Contributor Author

Anilople commented Jan 8, 2022

@apolloconfig/committers

Is it possible let @github-actions sign the CLA?

@zouyx
Copy link
Member

zouyx commented Jan 10, 2022

@apolloconfig/committers

Is it possible let @github-actions sign the CLA?

What about add github-actions to this JSON file directly?

@nobodyiam
Copy link
Member

@apolloconfig/committers

Is it possible let @github-actions sign the CLA?

@Anilople @zouyx We could add github-actions to allowlist as shown below to skip cla check.

allowlist: dependabot,bot*

@Anilople Anilople closed this Jan 11, 2022
@Anilople Anilople reopened this Jan 11, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2022
@Anilople
Copy link
Contributor Author

@apolloconfig/committers
Is it possible let @github-actions sign the CLA?

@Anilople @zouyx We could add github-actions to allowlist as shown below to skip cla check.

allowlist: dependabot,bot*

Done.

@Anilople Anilople closed this Jan 11, 2022
@Anilople Anilople reopened this Jan 11, 2022
@nobodyiam
Copy link
Member

@Anilople It looks like we need to submit a standalone pull request to add github-actions to allowlist first or it won't be effective for this pull request.

@apolloconfig apolloconfig unlocked this conversation Jan 12, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2022
@nobodyiam nobodyiam reopened this Jan 12, 2022
@apolloconfig apolloconfig unlocked this conversation Jan 12, 2022
@nobodyiam
Copy link
Member

recheck

Comment on lines -52 to +54
@Mock
private NamespaceLockService namespaceLockService;
@Mock
private NamespaceService namespaceService;
@Mock
private ItemService itemService;
@Mock
private BizConfig bizConfig;
@InjectMocks
NamespaceAcquireLockAspect namespaceLockAspect;
@Mock private NamespaceLockService namespaceLockService;
@Mock private NamespaceService namespaceService;
@Mock private ItemService itemService;
@Mock private BizConfig bizConfig;
@InjectMocks NamespaceAcquireLockAspect namespaceLockAspect;
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to keep the annotations on top of the fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Find the issue google/google-java-format#648 about it.

It seem that this feature didn't support yet.

Maybe we can wait the feature.

Copy link
Member

@nobodyiam nobodyiam Jan 18, 2022

Choose a reason for hiding this comment

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

emm...I think this is an important feature as most of the developers would be more comfortable with the annotation in its own line?

@stale
Copy link

stale bot commented Feb 17, 2022

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Feb 17, 2022
@Anilople Anilople removed the stale label Feb 21, 2022
@stale
Copy link

stale bot commented Mar 23, 2022

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Mar 23, 2022
@Anilople Anilople removed the stale label Mar 24, 2022
@stale
Copy link

stale bot commented Apr 23, 2022

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Apr 23, 2022
Copy link

stale bot commented Sep 17, 2024

This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot added the stale label Sep 17, 2024
Copy link
Contributor

coderabbitai bot commented Sep 17, 2024

Important

Review skipped

More than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review.

161 files out of 300 files are above the max files limit of 75. Please upgrade to Pro plan to get higher limits.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai generate interesting stats about this repository and render them as a table.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

stale bot commented Oct 5, 2024

This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions!

@stale stale bot closed this Oct 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
chore Project chores such as CI settings, typos, etc. stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add github action google-java-format or not
4 participants