--
You received this message because you are subscribed to the Google Groups "Sevntu Checkstyle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sevntu-checkst...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
public static File currentFile; |
public static boolean reportErrors = true; |
private void checkSingleSpaceBeforeToken(DetailAST ast) { |
if (ast.getColumnNo() < 2) { |
return; |
} Please move this IF to upper level; make method return boolean and log event in VisitEachToken; make a method as static(it could be pure logic method, without side effect) |
It will also return true if the token is the first token on the line or there is no |
* whitespace between the token and the previous token. |
if (ast.getColumnNo() < 2) { |
return true; |
} |
1) please make coverage to 100%, we are about to finish acceptance of your Check.please
3) looks like a false positive
6)There are a lot of cases of double space to separate trailing comment.Example:Looks like they do this for a reason that we do not know. I propose to do PR for some cases to guava project a see what they answer.
mvn cobertura:cobertura will generate HTML report with all details line by line
> preceded by a tab characterone tab is one character, why not false positive ?
int a = b;
Any proposal how to add support for this in check ? to let skip such trailing comments.
please always send me link to latest changes
single_spacesingle_whitespaceNot clear difference - Please explain.
1) did you send/discuss other changes to guava project ? can authors accept them ?
2) Looks like you Check even in most simple implementation is controversial, I recommend to run it against Spring project . After that we could decide on what state we will merge your Check to project and make first release of it.
int /* private */ a;
1) as you got 100% coverage you do not need update in pom.xml (that lines are fr old Checks only), please remove your changes.
2) Please squash all commits in one and do PR to our project, we a re close to merge event.
3)> No, what other changes do you have in mind?almost all violations that you found in Guava we might to propose to Guava. If merged - your Check is useful. If not - we will get another nuance with spaces and explanation :).Real testing of your Check.
4)> Maybe we should drop(ignore) comments entirely for the first release?Reasonable, but what if will make it by user controlled option ? boolean validateCommentNodes
5)> This will ignore comments entirely. (except block comments which is embed in codeAdd this as limitation to javadoc and description of the Check.
I will do review of reports a bit later..... But can you provide a analysis and summary of violations in Spring and Guava ?
> Mostly all violations are caused by horizontal alignment.Can you send them PR with changes for non-horizontal alignment cases ? It will be just real example of how useful your Check.> I inspected the first 100 violations in the spring project precisely and the remaining violations just sporadically.I recommend to send PR to them for 50-100 cases ,to see feedback.
3)> Maybe an option like the following will be fine. Separate comments byWhat is our resolution for this ? Do you want to make first release without this option ?
can you do PR to our project ?
>public void setValidateCommentNodes(boolean validateCommentNodes) {please recheck why indentation is wrong.
> private boolean validateCommentNodes = true;make it false by default. Looks like Spring also use this rule to separate trailing comment by double space.
> Spring PRanswer to question in PR :)
> Guava PRyou can close it, google have its own formatter - good to know.