Hi Dmitriy,
1)
Check co ...
Example:
First catch
do {
for (String exceptionNam
switch (leftNode.getType()) {
final StringBuilder nameB
for (Integer commentLineNumber
lineNumbers = cppCom
Please add "\n" before each of that text , to not make a continuous mess from code and documentation. write code for human.
2)
* Also you can allow using comment to decribe why exception not handle instead |
* of handling exception with code. To suppress exception by comment check use |
* regexp pattern. |
Also you can allow missed handling by special excuse comment, that you can set up in option suppressionCommentRegExp.
attention: I changed name of option on purpose to be more correct.
3)
* To configure check suppress exception by comment you need to set |
* IsCommentAllowed property to true and configure SuppressCommentRegexp as you |
* need. |
We need only one option suppressionCommentRegExp, if use does not care about comment content it set up ".*" in regexp
4)
DEFAULT_SUPPRESS_COMMENT_REGEXP = ".+No need to handle cause.+";
".+No need to handle that.+"
5)
public NeverIgnoreExceptionCheck()
please move all initialization to field definition. C-tor need to be removed.
6)
do {
switch (catchTypeNode.getType()) {
I do not understand that code , please put a comment on it .
can it be moved to separate method ?
7)
final Pattern methodNamePattern = Pattern |
.compile(mExceptionClassNameRegexp); ...
final Pattern methodNamePattern = Pattern |
.compile(mCommentSuppressRegexp);
Why compilation is done on each method call ? will it change during execution ? compile is very heavy operation it should be done ones if pattern is not changing.
8)
* Method get full exception name with package name. |
* @param aDotNode |
* - DetailAST node of AST which represent node with type DOT. |
* @return String which content exception name with full pass. |
*/ |
private static String getExceptionNameFromDot(final DetailAST aDotNode)
| Name of method is weird and not clear, in javadoc looks like you are more accurate. Please change name. |
|
9)
|
return checkCommentRegular(aSlistToken.getLineNo(), |
rCurlyTocken.getLineNo());
проверитьКоментарий...... - ответ: да/правда ?
что "да" ?
10)
final StringBuilder nameBuilder = new StringBuilder(beforeDotString); |
nameBuilder.append('.'); |
nameBuilder.append(leftNode.getNextSibling().getText()); |
return nameBuilder.toString();
| Why not a simple string concatenation ? I do not belive tht you will get any performance from that simple String concatenation. |
11)
Please generate HTML report from maven-checkstyle-plugin to recheck code on Guava library (we need testing on real code). You can ask Max Vetrenko on how to do that or I will provide you detail later.
thanks,
Roman Ivanov