-
Notifications
You must be signed in to change notification settings - Fork 529
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: add check-style plugin #1810
Conversation
CLA Assistant Lite bot Good! All Contributors have signed the CLA. |
I had signed CLA |
style/checkstyle.xml
Outdated
</module> | ||
|
||
<module name="LineLength"> | ||
<property name="max" value="200"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to merge our own style rule, we can refer to https://github.com/hugegraph/hugegraph-common/pull/67/files#diff-b36112ff71ee5b411c9149781cee470c6413dbf498272fa70eb00b8b7555207fR22
style/intellij-java-code-style.xml
Outdated
<codeStyleSettings language="JAVA"> | ||
<option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true" /> | ||
</codeStyleSettings> | ||
</code_scheme> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect an empty line at end of file
I have read the CLA Document and I hereby sign the CLA |
hugegraph checkstyle的对比一、插件版本hugegraph-common 3.1.0 二、注释方面hugegraph-common 采用了大量中文注释,虽然便于国内社区人员理解,但是会影响hugegraph在全球传播。 三、具体参数对比“无” 表示 无此项配置 “默认” 表示该项配置使用默认值 对比情况“一致”表示双方配置一样,或者配置使用效果一样。“补充”表示dolphinscheduler中由此配置,但是hugegraph中无此项配置。"有冲突"表示双方均有此项配置,且不一致。
|
style/intellij-java-code-style.xml
Outdated
<code_scheme name="hugegraph-style" version="173"> | ||
<option name="LINE_SEPARATOR" value="
" /> | ||
<option name="RIGHT_MARGIN" value="80" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems we already have one code-style file (in dir root), u could update that directly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your reminder,I have noticed this problems.
first i will delete "style/intellij-java-code-style.xml"
and then can you review "code/checkstyle.xml"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, if u update in the old file, we could see the diff easily
@seagle-yuan Thank you very much, your sorting is very clear. There are 2 conflicts I think can keep the existing style:
IMO the other 5 conflicts can follow the style of dolphinscheduler. |
style/checkstyle.xml
Outdated
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one blank line is ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait a minute,let me resubmit it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had deleted unnecessary balnk lines.
Codecov Report
@@ Coverage Diff @@
## master #1810 +/- ##
=========================================
Coverage 70.90% 70.90%
Complexity 980 980
=========================================
Files 446 446
Lines 37902 37902
Branches 5398 5398
=========================================
Hits 26876 26876
Misses 8296 8296
Partials 2730 2730 Continue to review full report at Codecov.
|
recheck |
<module name="MissingSwitchDefault"/> | ||
<module name="FallThrough"/> | ||
<module name="OuterTypeFilename"> | ||
<!-- <property name="severity" value="error"/>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should enable after style issues are all fixed?
</module> | ||
<module name="LineLength"> | ||
<property name="max" value="100"/> | ||
<property name="ignorePattern" value="^ *\* *[^ ]+$"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep ignorePattern:
^package.*|
^import.*|
a href|href|
http://|
https://|ftp://
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the different property to test and got the same result。so i think we can change this property at the next version.
"https://checkstyle.org/dtds/configuration_1_3.dtd"> | ||
<module name="Checker"> | ||
<property name="charset" value="UTF-8"/> | ||
<property name="severity" value="info"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should set to error after style issues are all fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution, LGTM
<property name="allowSamelineSingleParameterlessAnnotation" | ||
value="false"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems we could merge 154 to 153
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge first, enhance it in another pr
Add checkstyle plugin
implement #735
TODO: