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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Project chores such as CI settings, typos, etc. enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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