You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To ensure consistent code style and improve code quality, I think it is necessary to discuss code style specification now.
The specification includes two parts: suggest and mandatory.
The mandatory specification can be written into codestyle and checkstyle file, only pr meets the mandatory specification can be merged. Suggest specification can be break in sometimes, it's also recommended following the suggest specification.
Follow the code style specification when submitting pr and conducting code review.
Mandatory specification
All package in source code should be named start with org.apache.eventmesh.{module}.
Block indentation with 4 spaces.
Don't exceed 100 columns.
All method in interface should have clear comments.
The source code files should only contain English.
No more than two consecutive blank lines.
Class name should be named by UpperCamelCase style, attributes and method name should be named by lowerCamelCase style, the constant should be named by CONSTANT_CASE style.
Method in Unit test should be named by test{Method}_case, e.g. testHello_thorwUserException.
...
Suggest specification
Each method should be as short as possible, no more than 100 lines.
Each test method should test just one case and never contain more than two cases.
The method name should be a verb and the Class name should be a noun.
Using meaningful names and don't add comments anywhere.
Using concrete data structures and avoid using Map<String, Object> to describe data.
...
Here is I can think of, welcome to add and discuss.
The text was updated successfully, but these errors were encountered:
For better maintain, we can remove the code style file, since the checkstyle can also help us to format code in IDE. And we use checkstyle file to check the code style when we run GitHub CI.
Feature Request
To ensure consistent code style and improve code quality, I think it is necessary to discuss code style specification now.
The specification includes two parts: suggest and mandatory.
The mandatory specification can be written into
codestyle
andcheckstyle
file, only pr meets the mandatory specification can be merged. Suggest specification can be break in sometimes, it's also recommended following the suggest specification.Follow the code style specification when submitting pr and conducting code review.
Mandatory specification
org.apache.eventmesh.{module}
.UpperCamelCase
style, attributes and method name should be named bylowerCamelCase
style, the constant should be named byCONSTANT_CASE
style.Suggest specification
Here is I can think of, welcome to add and discuss.
The text was updated successfully, but these errors were encountered: