Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unified code style file to do format verification and formatting #2992

Closed
KomachiSion opened this issue Jun 8, 2020 · 4 comments · Fixed by #3293
Closed

Unified code style file to do format verification and formatting #2992

KomachiSion opened this issue Jun 8, 2020 · 4 comments · Fixed by #3293

Comments

@KomachiSion
Copy link
Collaborator

Issue Description

Type: feature request

Describe what you expected to happen

I hope to add a unified checkstyle file, and then use this file for format verification and formatting.

So I want to open a discussion to choose one checkstyle file:

  1. google checkstyle
  2. spring boot checkstyle
  3. modify from other checkstyle
  4. other
@zongtanghu
Copy link
Collaborator

I think google code checkstyple may be better choice.

@jzdayz
Copy link
Contributor

jzdayz commented Jun 9, 2020

google checkstyle

@KomachiSion
Copy link
Collaborator Author

From the discussion in issue and meeting at 2020.06.11. We prefer to use google style as based, and change some setting like line warp , indent and so on.

I will create nacosCodeStyle.xml file, init format for all code, and write a document in nacos.io to lead developers.

BTW, the Alibaba Java Coding Guidelines will also be used.

@KomachiSion KomachiSion self-assigned this Jun 15, 2020
chuntaojun added a commit that referenced this issue Jun 17, 2020
[ISSUE #2992] Add text import guide in codeStyle.md to enhance code style import
chuntaojun pushed a commit that referenced this issue Jun 17, 2020
* Update check style to ignore spring bean java doc

* use new code style for nacos-naming
chuntaojun pushed a commit that referenced this issue Jun 18, 2020
* use new code style for nacos-common

* Fix code style file can't set java import problem.
@KomachiSion
Copy link
Collaborator Author

KomachiSion commented Jun 28, 2020

reformat task:

chuntaojun pushed a commit that referenced this issue Jul 9, 2020
* Use new code style for nacos-cmdb module.

* Check again for nacos-common module.

* Check again for nacos-core module.

* Check again for nacos-naming module.

* skip nacos-test in checkstyle
yanlinly pushed a commit that referenced this issue Jul 10, 2020
…ng (#3293)

* Re-check code style for nacos-config module.

* Re-check code style for other module.

* Open checkstyle plugin check during build
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants