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

插件设置为英文时,对于“类、类属性、类方法的注释必须使用 Javadoc 规范”注释规约的检查,violation.msg配置有误 #440

Closed
riccoyu opened this issue Jan 7, 2019 · 1 comment

Comments

@riccoyu
Copy link
Contributor

riccoyu commented Jan 7, 2019

AbstractMethodOrInterfaceMethodMustUseJavadocRule 使用的消息模版 java.comment.AbstractMethodOrInterfaceMethodMustUseJavadocRule.violation.msg.parameter,中文模版
<entry key="java.comment.AbstractMethodOrInterfaceMethodMustUseJavadocRule.violation.msg.parameter"> <![CDATA[方法【%s】的参数【%s】缺少javadoc注释]]> </entry>
能够对先后传入的方法名、参数名渲染出正确的报错消息。但是,英文模版
<entry key="java.comment.AbstractMethodOrInterfaceMethodMustUseJavadocRule.violation.msg.parameter"> <![CDATA[parameter [%s] of method [%s] should have javadoc]]> </entry>
渲染出的报错消息里,方法名、参数名就写反了。参考下面的截图:
en_msg
cn_msg
同样的问题,也存在于java.comment.AbstractMethodOrInterfaceMethodMustUseJavadocRule.violation.msg.exception消息模版中。

riccoyu added a commit to riccoyu/p3c that referenced this issue Jan 7, 2019
…thod名称与param名称颠倒的问题、以及method名称与exception名称颠倒的问题。Fixes alibaba#440
@riccoyu
Copy link
Contributor Author

riccoyu commented Jan 8, 2019

fix后的样子:
en_fixed

kerie pushed a commit to kerie/p3c that referenced this issue Jan 22, 2019
…thod名称与param名称颠倒的问题、以及method名称与exception名称颠倒的问题。Fixes alibaba#440
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant