Using Google Java Code Style To Reformat Code#1060
Conversation
|
@dota17 you think it is worth to enforce the style via github action? Best regards, |
|
IMO, it is worth. You can refer to the Apache Projects. When people submit their code to the repository, the code reviewer will always prompt the submitter to reformat code to meet the code style. |
|
Sounds good, can you setup a github action for that? |
|
Yes, I can. But I don't have the permissions to configure. |
|
You should be able to edit the github actions in your fork and merge with this PR |
|
OK, I will do it. |
marci4
left a comment
There was a problem hiding this comment.
Please include an action to check for the correct formatation
|
Sorry, I was a little busy last week. I'll take care of it as soon as possible. |
|
@dota17 all good. Just wanted to write down why this PR is not yet merged. |
Using Maven Checkstyle Plugin and Add Github Actions to check code style
|
There are some check points that we should discuss here, such as If we want to ignore the check points, we can add more filters in the file - |
|
I think we can ignore OverloadMethodsDeclarationOrder and NonEmptyAtclauseDescription |
update suppressions and cleanup code
|
@dota17 ping me when you are happy with the PR |
|
@marci4 It is ready to be merged. |
Description
The current code format is not very good, especially when reading the code online on github. I can't stand this anymore.
I chose Google Java Code Style to reformat the source code.
The reason why I chose Google's version:
I would consider adding the google checkstyle next and optimize the code format further.
Related Issue
Fixes #1050
How Has This Been Tested?
All new and existing tests passed.
Types of changes
I choose the
intellij-java-google-style.xmland import in IDEA, and then reformat code with the tools.The main change is the source code in the src directory.
Checklist: