Java – “the first sentence should end in a period of time.”

Java checkstyle puzzles me

package pmain;

/**
 * Some text here.
 */

public class Main {

}

This is literally all the code Checkstyle displays "the first sentence should end in a period of time." In "/ * *"

Why does checkstyle generate this warning?

The checkstyle configuration I need to use is broken? Did I do wrong? Isn't "here are some words" the first sentence? Is' ' Not for a while?

Solution

It's only tested on my machine and can't actually be copied: I don't get a dot warning at the end of the sentence But once I delete it (and run checkstyle again), the rule is triggered correctly and I get a warning on the / * * line

The blank line after the comment has not changed much

Carefully check whether the point is really a point, not some other characters like "point" After changing the file, please check carefully and re run checkstyle It does not automatically perform checks

Maybe someone plays checkstyle settings In fact, there are two properties that can control this rule: checkfirstsentence is true or false, and endofsentenceformat is a regular expression that should match period But if the rule set redefines the attribute...;)

Further reading

> http://checkstyle.sourceforge.net/config_javadoc.html

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>