Maxim Vetrenko. Project: Checkstyle configuration for Google's Java Style guide. GSoC 2014

2,500 views
Skip to first unread message

Макс Ветренко

unread,
Apr 29, 2014, 4:53:02 AM4/29/14
to checksty...@googlegroups.com

Макс Ветренко

unread,
Apr 29, 2014, 4:54:49 AM4/29/14
to checksty...@googlegroups.com
Monday report:
1) Detailed plan of practice is in progress.
2) Investigating Google's Java Style

Макс Ветренко

unread,
Apr 29, 2014, 3:58:34 PM4/29/14
to checksty...@googlegroups.com

Ruslan Diachenko

unread,
Apr 29, 2014, 4:11:21 PM4/29/14
to checksty...@googlegroups.com
Hi Max,

Here's my understanding of strategic plan: this plan is created for your development (coding) period and it should be the main resource to go to. If I open it I don't have to have any questions such as "what should I do?" and "where can I get more information because it isn't clear enough?".

I didn't find out any analysis phase in your plan. You have to do a sort of investigation before starting coding and your plan should base on it. Here are some of the main points your plan has to contain:
- which checks have already been covered by Google's Java rules (links)
- which checks have been covered by GJ rules partly (links), some notes about extensions, will they be applicable to the existing checks or ...
- which GJ rules Checkstyle can't cover (why can't we do that?)
- which GJ rules Checkstyle can cover but we don't have such checks (analyze and create issues, put these links into your plan)

Your didn't mention anything about documentation of your work as well.

Please rewrite your plan according to my comment and our Skype call.

On Tuesday, April 29, 2014 10:58:34 PM UTC+3, Макс Ветренко wrote:

Макс Ветренко

unread,
May 1, 2014, 7:38:26 AM5/1/14
to checksty...@googlegroups.com
https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage

The plan is in progress. I investigated Google's Java Style and now I am processing the result of this investigation. This plan is not a final version. 

Roman Ivanov

unread,
May 1, 2014, 5:39:47 PM5/1/14
to checksty...@googlegroups.com
1) Why I do not see changes in plan ? that plan does not mean anything to me . Please udpate it.

2) http://google-styleguide.googlecode.com/svn/trunk/javaguide.html
 is "Last changed: March 21, 2014" what version you based on ?

3) "1.1 License or copyright information, if present"
What about http://checkstyle.sourceforge.net/config_header.html ? Checkstyle deman license header on all its sources - this is existing check.
If you not sure what Goolge expect from this rule - ask them :).

4) that wikik is for users , 
Existing Check: LineLengthCheck.java
so please remove references to javacode and put links to documentation HTML page.

5) on each you attempt to create or update a existing Check - please consult with mentor.

6)
"2.1 Exactly one top-level class declaration"

Why missed ?

7) "2.1 Class member ordering"

if you are not sure - put "??I do not know???" in wiki a sign to Mentor to help you.

8) "New Check: NoSplitOverloads"
discuss with a mentor

Ruslan Diachenko

unread,
May 2, 2014, 7:50:25 AM5/2/14
to checksty...@googlegroups.com
In addition to Roman's notes here're some from me:

Why did you skip this section?

>> 1.2 Package statement
>> Need to ignore "^package" pattern
What did you mean by this? Why are you going to ignore pattern? Usually we ignore some values if they match some specific pattern :)

I noticed some misunderstandings in Google's style guide, didn't you??
On the one hand "Wildcard imports, static or otherwise, are not used" (http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.1-wildcard-imports)

>> 1.5 Ordering and spacing
What exactly are you going to update?

>> 2.2 Overloads: never split
Let's discuss

>> 3.4 Block indentation: +2 spaces
Why is it skipped?

>> 3.5 One statement per line
Why is it skipped?

>> Column limit: 80 or 100
In addition to package and import statements bear in mind these exceptions:
- Lines where obeying the column limit is not possible (for example, a long URL in Javadoc, or a long JSNI method reference).
- Command lines in a comment that may be cut-and-pasted into a shell.

Roman Ivanov

unread,
May 4, 2014, 10:52:45 PM5/4/14
to checksty...@googlegroups.com
I did investigation for Javadoc part of Google's Style - https://docs.google.com/document/d/1hG5EHITMSRgmR0XmY3-68GoivArVnPeDGf954F56UY0/edit?usp=sharing

Max, please adopt that to your wiki page.

Макс Ветренко

unread,
May 5, 2014, 9:02:15 AM5/5/14
to checksty...@googlegroups.com

Tried to adopt Javadoc part, need to discuss some points. Also I asked a question in 
Project Hosting on Google Code about some misunderstandings. 

Ruslan Diachenko

unread,
May 5, 2014, 10:10:55 AM5/5/14
to checksty...@googlegroups.com
Max, 

1. I don't still see any changes in your plan. Please provide them.
2. Mark all Romans' and my questions as 'done' if you resolved them or mark them 'need to discuss' if you still have questions.

Макс Ветренко

unread,
May 5, 2014, 12:26:16 PM5/5/14
to checksty...@googlegroups.com
Roman:
2. Done
3. Done
4, In progress
5. In progress
6. In progress
7. In progress
8. In progress


Roman Ivanov

unread,
May 5, 2014, 6:36:51 PM5/5/14
to checksty...@googlegroups.com
Where is a Monday report ? with details what was read/created/written/tested/investigated .... 

From this day on I need report from all student till 20:00 Monday/Thursday MSK timezone. 

If you working at that time - just put in report what you have till that time, and can continue your work further.
If you think that you will not have time till 20:00 to make a report - do it the day before and post it to mail-list.

ATTENTION: Please do not squash all your commits on your remote repositories(forks).
I need to see how much progress from report to report. You will do squash just before PullRequest to us after all tasks are done.



Макс Ветренко

unread,
May 6, 2014, 12:26:51 AM5/6/14
to checksty...@googlegroups.com
Monday report:
2. Investigated all rules in Google Java Style
3. Wiki page is in progress 

Roman Ivanov

unread,
May 6, 2014, 2:33:18 PM5/6/14
to checksty...@googlegroups.com
Max, 

>> 1. New Plan

3. TESTING CHECKSTYLE CONFIGURATION
3.1 JUnit Testing.
3.2 Manual Testing.
3.3 Integration Testing.

Please put that to time of each Check implementation, Check is not done if it is not covered by UTs. We do Test Driven development.

>> 3. Wiki pages ...

I need to know what was done from Thursday to Monday. So please make a list of completed/changed chapters at this wiki.

Макс Ветренко

unread,
May 7, 2014, 5:35:22 PM5/7/14
to checksty...@googlegroups.com

Roman Ivanov

unread,
May 7, 2014, 5:46:37 PM5/7/14
to Макс Ветренко, checksty...@googlegroups.com
Hi Max, 
please let us know with whom you want to discuss that questions. The best approach: catch Ruslan first and me as second option.

Макс Ветренко

unread,
May 8, 2014, 8:46:37 AM5/8/14
to checksty...@googlegroups.com, Макс Ветренко
Thursday report:

1.  Almost finished Wiki page. Link to comparing changes is here. I think, that Checkstyle is almost covers Google Java Style. I found many Checks in  Ruslan, you will be free today after 11 (Kyiv time)? I want to discuss a few new Checks. 

2. Update plan. I put "TESTING" to each section implementation. This plan will be more detailed, after finishing Wiki page, as I'll know what new Checks I'll have to implement, and what existing Checks I'll have to update. 

Ruslan Diachenko

unread,
May 8, 2014, 9:30:04 AM5/8/14
to checksty...@googlegroups.com, Макс Ветренко
Hi Max,

Let's have a Skype call today at 11:30 p.m. (Kiev time).

I also insist on posting a small summary (your understanding of the problems) here just after each Skype call with Roman or me.
1. It will show us that you really understood the problems we discussed.
2. It will help me and Roman to be aware about each other's conversation in order so we could supplement each other if needed.

Макс Ветренко

unread,
May 8, 2014, 5:24:28 PM5/8/14
to checksty...@googlegroups.com, Макс Ветренко
Skype summary with Ruslan:
1.  Switch statements. Google Java Style doesn't require to palce "default" in the end of "switch" statement.
3. Horizontal Alignment. Try to update WhitespaceAfter
4. Camel case: defined.  Maybe, this rule is covered with AbbreviationAsWordInName


Roman Ivanov

unread,
May 8, 2014, 5:47:28 PM5/8/14
to Макс Ветренко, checksty...@googlegroups.com
Max, 

please put at end of plan "Recheck all Checks at are used in GoogleStyle for open issues(github, sourceforge) and fix them"
Because Check could exist - but be extremely buggy :), and unusable in most cases, so known/registered problems have to be resolved.

thanks,
Roman Ivanov

Макс Ветренко

unread,
May 10, 2014, 3:34:41 PM5/10/14
to checksty...@googlegroups.com, Макс Ветренко
Poman, I put "Recheck all Checks...." at the and of plan.
Skype summary with Ruslan:
1. Type variable names. Have to try to adjust existing Checks: ClassTypeParameterNameMethodTypeParameterName.
2. Whitespace characters. Avoid Tab characters.
3. Ignore Non-ASCII characters rule, because Java compiler doesn't compile decoded Unicode characters. 

Roman Ivanov

unread,
May 10, 2014, 4:56:28 PM5/10/14
to Макс Ветренко, checksty...@googlegroups.com
>>  Ignore Non-ASCII characters rule, because Java compiler doesn't compile decoded Unicode characters. 

What does this phrase mean?  http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2.3.3-non-ascii-characters clearly show you UTF characters String in java code. How it could it non-compilable if it just String constant?


- what Check cover it, 
- what could not be checked with wide reason description.
- link to issue to create new Check.
- if you do not know yet - there should be "?????" for that chapter.

I do not see in your wiki following chapter: 2.3.3 Non-ASCII characters 

Макс Ветренко

unread,
May 12, 2014, 10:00:40 AM5/12/14
to checksty...@googlegroups.com, Макс Ветренко
Monday report:

1. Almost finishing Wiki
2. Сonfigure Checkstyle with different Regexp. Tried to configure Checks to cover Google's Java Style rules.
3. Updated plan.


P.S. Sorry for little report, tonight I'll try to finish Wiki page and correct existing chapters.


Roman Ivanov

unread,
May 12, 2014, 2:24:01 PM5/12/14
to Макс Ветренко, checksty...@googlegroups.com
Max, why you keep ignoring my questions ?

>> Last changed in Google's Java Style: March 21, 2014
please provide a link to that version of file, it have to be persistent forever. 

on Thursday report all my questions in that mail list  have to be answered, and reflected in plan and wiki.

Макс Ветренко

unread,
May 12, 2014, 2:34:31 PM5/12/14
to checksty...@googlegroups.com, Макс Ветренко

Ruslan Diachenko

unread,
May 12, 2014, 4:23:37 PM5/12/14
to checksty...@googlegroups.com, Макс Ветренко
Please have a look at my notes:

>> 1.4 Special escape sequences

>> 1.5 Non-ASCII characters

>> 3.24 Numeric Literals
>> Existing Check, needed to update: IllegalTokenText

>> 3.7 Where to break

>> 5.1 @Override: always used


And now it's time for questions:

0) >> 5.3 Static members: qualified using class
It seems that Checkstyle doesn't have such a rule. Why did you skip it? Please investigate if I'm mistaken.

1) >> 2.1 License or copyright information, if present

2) >> 2.6.1 Exactly one top-level class declaration
Why did you skip it?

3) 4.7 Grouping parentheses: recommended
Why is it skipped?

4) >> 4.1 Rules common to all identifiers
Why is it empty?

5) Create issues for all new checks and those checks which should be updated. Put the links into your wiki and plan.
WARNING!! Phrases like "Maybe needed to update" or "needed to update" or the stuff like that MUST NOT be present in your wiki and should be changed onto links to real issues.

Please work through and resolve all Roman's and my notes/questions till the Thursday evening in order so we can switch to the last point "6 Javadoc".
NOTE!! Mark every question as 'done' or 'need to discuss' or ...

Ruslan Diachenko

unread,
May 14, 2014, 3:16:25 AM5/14/14
to checksty...@googlegroups.com, Макс Ветренко
One more note: all sections in your wiki page have to have the same numbers as in Google Style Guide.

For instance, currently you have "1.1 File name" but it has to be "2.1 File name".

Макс Ветренко

unread,
May 14, 2014, 3:47:26 PM5/14/14
to checksty...@googlegroups.com, Макс Ветренко

Ruslan Diachenko

unread,
May 14, 2014, 4:25:54 PM5/14/14
to checksty...@googlegroups.com, Макс Ветренко
It doesn't.

Consider the following case - file Foo.java with such content:
public class Foo { ... }
class Bar { ... }

Макс Ветренко

unread,
May 15, 2014, 4:44:42 AM5/15/14
to checksty...@googlegroups.com, Макс Ветренко

Thursday report:


Questions from Roman:


1.” Why I do not see changes in plan ? that plan does not mean anything to me . Please udpate it.”


Answer:

Now my plan is updated. Please, check in: https://docs.google.com/document/d/1s1ymtee2leJYFG1xaeboQUWlGqGfz-54e7kI3hvGln4/edit#


2. “
http://google-styleguide.googlecode.com/svn/trunk/javaguide.html is "Last changed: March 21, 2014" what version you based on ?”


Answer:

Added link (https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#last-changed-in-google-java-style-march-21-2014) to the last changed file.


3. “"1.1 License or copyright information, if present"

What about http://checkstyle.sourceforge.net/config_header.html ? Checkstyle deman license header on all its sources - this is existing check.

If you not sure what Goolge expect from this rule - ask them :).”


Answer:

I found existing Check: https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#31-license-or-copyright-information-if-present


4. “that wikik is for users ,

Existing Check:LineLengthCheck.java.

so please remove references to javacode and put links to documentation HTML page.”


Answer:

Done.


5. “on each you attempt to create or update a existing Check - please consult with mentor.

http://checkstyle.sourceforge.net/config_imports.html#ImportOrder


Answer:

I created some new issues and tonight I want to discuss it with Ruslan.



6. “"2.1 Exactly one top-level class declaration"


Why missed ?”


Answer:

https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#341-exactly-one-top-level-class-declaration


7. “"2.1 Class member ordering"

http://checkstyle.sourceforge.net/config_coding.html#DeclarationOrder

https://github.com/sevntu-checkstyle/sevntu.checkstyle/blob/master/sevntu-checks/src/main/java/com/github/sevntu/checkstyle/checks/coding/CustomDeclarationOrderCheck.java


Answer:

https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#342-class-member-ordering

This case will be discussed tonight with Ruslan. After discussing I'll provide Skype Summary.


8. “"New Check: NoSplitOverloads"

discuss with a mentor”


Answer:

Created new issue to update existing Check: https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#3421-overloads-never-split


9. “please put at end of plan "Recheck all Checks at are used in GoogleStyle for open issues(github, sourceforge) and fix them"

Because Check could exist - but be extremely buggy :), and unusable in most cases, so known/registered problems have to be resolved.”


Answer:

Done. https://docs.google.com/document/d/1s1ymtee2leJYFG1xaeboQUWlGqGfz-54e7kI3hvGln4/edit# paragraph 2.9


10. “What does this phrase mean?  http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2.3.3-non-ascii-characters clearly show you UTF characters String in java code. How it could it non-compilable if it just String constant?


Answer:

Founded existing Check: https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#233-non-ascii-characters


11. “All chapters from http://google-styleguide.googlecode.com/svn/trunk/javaguide.html have to exists at https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage with detailed information:

- what Check cover it, 

- what could not be checked with wide reason description.

- link to issue to create new Check.

- if you do not know yet - there should be "?????" for that chapter.


Answer:

Try to fix Wiki. Please, Check it. https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage




Questions from Ruslan:


1. “ Source file basics (http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s2-source-file-basics)

Why did you skip this section?”


Answer:

Added Source file basics into Wiki page. https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#2-source-file-basics


2. “ Need to ignore "^package" pattern

What did you mean by this? Why are you going to ignore pattern? Usually we ignore some values if they match some specific pattern :)”


Answer:

Sorry, it's my mistake. We need to ignore “^package” and “^import” values. https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#32-package-statement
https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#332-no-line-wrapping


3. “I noticed some misunderstandings in Google's style guide, didn't you??

On the one hand "Wildcard imports, static or otherwise, are not used" (http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.1-wildcard-imports)

On the other hand "All static imports in a single group" (http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s3.3.3-import-ordering-and-spacing)”


Answer:

I have not answer from Google, so I want to offer next solution: static imports will be in the single group and another Check will warn not to use static imports. So, if developer needs static imports, he will ignore the Checkstyle warn.


4. “1.5 Ordering and spacing

What exactly are you going to update?”


Answer:

https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#333-ordering-and-spacing


5. “2.2 Overloads: never split

Let's discuss”


Answer:

I want to update existing Check: https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#3421-overloads-never-split


6. “3.4 Block indentation: +2 spaces

Why is it skipped?”


Answer:

I found existing Check: https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#42-block-indentation-2-spaces


7. “3.5 One statement per line

Why is it skipped?”


Answer:

I found existing Check: https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#43-one-statement-per-line


8. “Column limit: 80 or 100

In addition to package and import statements bear in mind these exceptions:

- Lines where obeying the column limit is not possible (for example, a long URL in Javadoc, or a long JSNI method reference).

- Command lines in a comment that may be cut-and-pasted into a shell.”


Answer:

I don't understand how to implement this rule, need to discuss.


9. “5.3 Static members: qualified using class

It seems that Checkstyle doesn't have such a rule. Why did you skip it? Please investigate if I'm mistaken.”


Answer:

We can't fully cover this rule. We can detect bad cases only if instance is created in the same class. For example:




class Foo {


public static void fooStaticMethod() {

//foo code

}


public void fooMethod() {

Foo foo= new Foo();

foo.fooStaticMethod(); //bad case

}

}


We can't detect bad using, if instance is adhere to another class. For example:


class Foo {


public static void fooStaticMethod() {

//foo code

}


public void fooMethod() {

Foo2 foo2= new Foo2();

foo2.fooStaticMethod2(); //bad case

}

}


Or Eclipse will warn, that “The static method fooStaticMethod() from the type Test should be accessed in a static way


10. “2.1 License or copyright information, if present

Have a look at http://checkstyle.sourceforge.net/config_header.html#RegexpHeader. Can we play with it?”


Answer:

I think, yes. Regular expressions allow to detect license or copyright information.


11. “2.6.1 Exactly one top-level class declaration

Why did you skip it?”


Answer:

https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#341-exactly-one-top-level-class-declaration


12. “4.7 Grouping parentheses: recommended

Why is it skipped?”


Answer:

https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#47-grouping-parentheses-recommended

needed to extra investigation.


13. “4.1 Rules common to all identifiers

Why is it empty?”


Answer:

https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage#51-rules-common-to-all-identifiers

Roman Ivanov

unread,
May 16, 2014, 1:46:55 AM5/16/14
to checksty...@googlegroups.com, Макс Ветренко
Max,

1)
Ordering of Items, chapters names in your report and in Google Style have to be the same.

2) Items that need to be discussed - have to be "???????"
Non investigated chapter - should be "TODO"
Each chapter have to have comment.
I and Ruslan should clearly see what is left.

3)
"2.8 Create .xml configuration to run Checkstyle Google Java Style. " It is too late to create config at the end.
You need to create it at the beginning for all existing Checks, update it after each new implementation or update, finally recheck that all chapters are covered and nothing is missed.

4) Ask on Google Style forum what open source Google project is following that Style.  
You need to test your configuration to show that your configuration is useful and restrict all rules from Style.
Put that step to your plan, at the end.

thanks,
Roman Ivanov

Макс Ветренко

unread,
May 16, 2014, 2:22:10 AM5/16/14
to checksty...@googlegroups.com, Макс Ветренко

Ruslan, I want to discuss with you next questions:

1.       I  don’t fully understand how to update DeclarationOrder and CustomDeclarationOrder Checks. https://github.com/maxvetrenko/checkstyle/wiki/Google%27s-Java-Style-Checkstyle-Coverage#342-class-member-ordering

2.       I want to talk about static imports.

I don’t understand how to detect command lines or JSNI method reference. “ “Column limit: 80 or 100

In addition to package and import statements bear in mind these exceptions:

- Lines where obeying the column limit is not possible (for example, a long URL in Javadoc, or a long JSNI method reference).

- Command lines in a comment that may be cut-and-pasted into a shell.”

 

3.     Need to discuss static members. 

Roman Ivanov

unread,
May 16, 2014, 1:58:08 PM5/16/14
to Макс Ветренко, checksty...@googlegroups.com

Hi Max,

OrderCheck was developed by Baratali Izmailov, contact him for details if Ruslan in unavailable. Format of class is described there https://groups.google.com/d/msg/sevntu-checkstyle/_nOVtWDxPJo/sBb8s2D4lTwJ .
beware that this Check is sevntu project, if have to use it you need to initiate transferring it checkstyle project

For line length Check, you can check Guava code to see how they follow that convention for long comment lines. URL cannot be multilined, but may be Google demand event comments to follow that restriction 100 symbols. I recommend to ask Google about this and recheck Guava by LineLengthCheck ourself.

Please add in your plan for each Checks update to update html documentation on web site.

Roman Ivanov

unread,
May 16, 2014, 4:56:33 PM5/16/14
to checksty...@googlegroups.com, Макс Ветренко
Hi Max,

Ruslan will be busy till 25th of May, so all question have to be resolved with me. Find me in skype or mail-list

thanks,
Roman Ivanov

Макс Ветренко

unread,
May 18, 2014, 5:21:00 PM5/18/14
to checksty...@googlegroups.com, Макс Ветренко
Found in Guava such URL

* <p>May <a

Checkstyle found, that line has 115 characters. We can parse URL's by <a> teg or href. 

Roman Ivanov

unread,
May 19, 2014, 1:01:10 AM5/19/14
to Макс Ветренко, checksty...@googlegroups.com
Nobody guaranty you that URL will be enclosed in A tag. You can not reply on that.

Макс Ветренко

unread,
May 19, 2014, 7:29:04 AM5/19/14
to checksty...@googlegroups.com, Макс Ветренко
Skype summary with Roman: 

1. Investigated Javadoc paragraph
2. Needed to transform Wiki page to the table view
3. At the begining it's necessary to create xml config for existing Checks.
4. It's necessary to test config on Guava project. 

Monday report: 
2. I start to create .xml confugation for existing Checks to test them on Guava project. 

Tonight I'll write one more report. 

Roman Ivanov

unread,
May 19, 2014, 1:44:37 PM5/19/14
to checksty...@googlegroups.com, Макс Ветренко
Max,

1) Utf8, can we recheck encoding?
2) Update wiki to clearly state where update is required, format of description should be the same
3) Static import is not forbidden by google
4) Why some cells are empty in table for, symbols "--" (mean non relevant text) and arrow down (mean "parent chapter, see below") (http://en.wikipedia.org/wiki/%E2%86%93), 
4.1) make a legend for table, 
4.2) make top sentence as ordinary text - no reason to keep that that big.
5) Generate html report (by usage of maven pluigin) over guava and provide link to it, fork guava repo to github to keep sources unchanged, report have to be stored at github (gh-pages). To all of that make a links from wiki. After each check implementation or configuration is done - report have to regenerated to show mentors how it works.
6) All questions "????" have to be resolved with me asap.

Roman Ivanov

unread,
May 20, 2014, 12:12:11 AM5/20/14
to checksty...@googlegroups.com, Макс Ветренко

Guide on how to create github pages https://guides.github.com/features/pages/

Макс Ветренко

unread,
May 20, 2014, 8:43:19 AM5/20/14
to checksty...@googlegroups.com, Макс Ветренко

Макс Ветренко

unread,
May 20, 2014, 10:41:28 AM5/20/14
to checksty...@googlegroups.com, Макс Ветренко

Макс Ветренко

unread,
May 21, 2014, 7:30:39 AM5/21/14
to checksty...@googlegroups.com, Макс Ветренко
Have a problem with this Regexp https://github.com/maxvetrenko/checkstyle/blob/GoogleStyle/checkstyle_google_style.xml#L81
Checkstyle gives me such message: "Method Names: Name 'copyOf' must match pattern '(^[a-z][a-zA-Z0-9]* | ^[test][A-Z][a-zA-Z0-9]*(_[a-z][a-zA-Z0-9]*)?)$'." 
I don't understand where I have made a mistake. 

Макс Ветренко

unread,
May 21, 2014, 8:12:26 AM5/21/14
to checksty...@googlegroups.com, Макс Ветренко

Ruslan Diachenko

unread,
May 21, 2014, 8:19:41 AM5/21/14
to checksty...@googlegroups.com, Макс Ветренко
Here is a great Eclipse plugin - http://myregexp.com/eclipsePlugin.html.
You can check your regular expressions right away.

On Wednesday, May 21, 2014 3:12:26 PM UTC+3, Макс Ветренко wrote:
Sorry.. Resolved https://github.com/maxvetrenko/checkstyle/blob/GoogleStyle/checkstyle_google_style.xml#L81

Макс Ветренко

unread,
May 21, 2014, 8:21:52 AM5/21/14
to checksty...@googlegroups.com, Макс Ветренко
I found a great site to test regular expressions - http://www.pagecolumn.com/tool/regtest.htm

Ruslan Diachenko

unread,
May 21, 2014, 8:33:24 AM5/21/14
to checksty...@googlegroups.com, Макс Ветренко
Your regex doesn't work properly on the following test cases:
testmethod
testMethod_STATE
testMETHOD_________777

And there might be much more failed cases.

Roman Ivanov

unread,
May 21, 2014, 9:49:43 AM5/21/14
to Ruslan Diachenko, Макс Ветренко, checksty...@googlegroups.com

Hi Max,

"test" prefix is only requirement of junit3 library that is not supported any more, junit4 library force to use annotation @Test on method.

Take a look at https://groups.google.com/forum/m/#!msg/sevntu-checkstyle/VBJlFhB0fuc/ey7y6RVomSgJ

.

Макс Ветренко

unread,
May 22, 2014, 9:12:49 AM5/22/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко
Thursday report:
1. Completed the investigation of checkstyle .xml configuration 
2. Created first xml configuration to test existing Checks and find possible problems. 
3. Started to investigate Apache Maven Checkstyle Plugin 

P.S. I don't forgot about Roman's questions. 

Макс Ветренко

unread,
May 22, 2014, 9:14:29 AM5/22/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко
Link to the first Checkstyle configuration - https://github.com/maxvetrenko/checkstyle/blob/GoogleStyle/checkstyle_google_style.xml
Link to Apache Maven Checkstyle Plugin documentation - http://maven.apache.org/plugins/maven-checkstyle-plugin/ 

Макс Ветренко

unread,
May 22, 2014, 9:22:32 AM5/22/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко
Roman, I have found in Guava a lot of cases with following name test<MethodUnderTest>_<state>. 
So, I think, that we should take into consideration such possibility. 

Roman Ivanov

unread,
May 24, 2014, 12:07:55 AM5/24/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко
Hi Max,

>> Roman, I have found in Guava a lot of cases with following name test<MethodUnderTest>_<state>. 
>> So, I think, that we should take into consideration such possibility. 
Review  mail-thread that I provided to you, "test" methods should be properly detected. You can not allow "_" in all other methods. 

> 6) All questions "????" have to be resolved with me asap.
asap mean - "as soon as possible".  So call me in skype tomorrow.


Where in plan sentences about testing of each Check over Guava and after each new configuration update ?

Roman Ivanov

unread,
May 24, 2014, 1:30:45 AM5/24/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко
maven-checkstyle-plugin usage could be found at:


in case of updates in Checkstyle project we could just reinstall maven checkstyle plugin:
"svn checkout http://svn.apache.org/repos/asf/maven/plugins/tags/maven-checkstyle-plugin-2.12.1 maven-checkstyle-plugin"
do changes in pom.xml for <checkstyleVersion>5.7</checkstyleVersion> to <checkstyleVersion>5.8-SNAPSHOT</checkstyleVersion>
do "mvn install".

Макс Ветренко

unread,
May 24, 2014, 4:39:30 PM5/24/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко

Макс Ветренко

unread,
May 26, 2014, 10:20:00 AM5/26/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко
Monday report:
Resolved almost all questions in wiki page and created the legend of coverage table. Resolved all points in last Skype summary. Updated plan and included html report based on Checkstyle Maven Plugin. Created the GH-page
But I have a very big problems! I failed to make an html report using my xml config and Checkstyle Maven Plugin. Ruslan, please, help me, I really can't understand how to do this. I have compiled Checkstyle, Checkstyle Maven Plugin and that's all. 

Макс Ветренко

unread,
May 26, 2014, 6:03:43 PM5/26/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко

Roman Ivanov

unread,
May 26, 2014, 10:30:08 PM5/26/14
to Макс Ветренко, checksty...@googlegroups.com, Ruslan Diachenko
we need to have exact fork on github of Guava library for last fixed version - 17.0, as right now they have 18.0-SNAPSHOT.

We need to run checkstyle configuration over non-changing sources.

So your wiki page should have links:
- to Guava fork on github 
- latest stable checkstyle configuration
- latest HTML report over Guava, generated base on latest stable Checkstyle configuration .

Ruslan Diachenko

unread,
May 27, 2014, 10:42:04 AM5/27/14
to checksty...@googlegroups.com, Ruslan Diachenko, Макс Ветренко
Hi Max,

Regarding to your question about http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s4.5.1-line-wrapping-where-to-break . Here is an existing check which covers this rule partially: http://checkstyle.sourceforge.net/config_whitespace.html#OperatorWrap . It covers all the operators but not separators like '.' and ',' .

The following issue already exists: https://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/125 . So, in this issue we have to cover only the case with separators.

Макс Ветренко

unread,
May 27, 2014, 12:35:15 PM5/27/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
Guava Libraries v.17.0 on GitHub
HTML report on Guava 17.0.

1. Done
2. Done
3. Done

Roman Ivanov

unread,
May 27, 2014, 3:19:59 PM5/27/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
1) Stable Guava Libraries. ===> Stable Guava source  for v17.0.


2) 4.8.4.1 Indentation Regexp ===> TODO chck existing IndentationCyheck

3) we need to somehow markin that table :
 "exiting Check cover all % of requirements from Google"
"exiting Check cover some % of requirements from Google, 100% could be dane after update"
"new check is required"
"exiting Check cover some % of requirements from Google, 100% is not possbile"
"requirements are not possible to check by Checkstyle at all"

does it make sense to use some symbols for that ? or images ?....please provide some way to clearly see what % of coverage we have for each rule.

Макс Ветренко

unread,
May 27, 2014, 3:57:00 PM5/27/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
1. Roman, your comment:  "this is extension to existing Check that demand JavaDoc. Try to measure method complexity and demand JavaDoc base for complex methods, and skip JavaDoc for banal methods. Not sure it is possible to implement, but lets try to think about it." - So, I have try to update JavaDocMethodCheck to avoid JavaDoc for overrided banal methods. By what criterion we will determine the degree of method's difficulty? Maybe, it is the the number of lines, or something else. 

Roman Ivanov

unread,
May 28, 2014, 1:18:36 AM5/28/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
Hi Max,


what Google what to check is where to put ".", in case line have to be split into few lines.
that is related to all symbols "(" after method call, or "|" in sequence of Exceptions , or "," in long sequence of arguments inmethods.



please continue investigation of this Check.

thanks,
Roman Ivanov.

Roman Ivanov

unread,
May 28, 2014, 1:25:08 AM5/28/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
> By what criterion we will determine the degree of method's difficulty? Maybe, it is the the number of lines, or something else.

lets come with the simples option - line count.


No it is not an option as "Verifies that the java.lang.Override annotation is present when the {@inheritDoc} javadoc tag is present."
you can not reply on javaDoc to be present.
That Vlidation could not be checked by Checkstyle, as you detect that you need to take a look as parent class. But Checkstyle have no way open or look at another Class file. 

> 3. Investigate file encoding to c ...............

I do not see how that will help us.

Макс Ветренко

unread,
May 29, 2014, 12:07:02 PM5/29/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
Thursday report:
1. Wiki page - complite
2. GitHub page with Maven Checkstyle Plugin html report,

Ready to implement Google Java Style

Ruslan Diachenko

unread,
May 29, 2014, 12:14:27 PM5/29/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
Max,

Why do you ignore Roman's and my notes??

My past noteThe following issue already existshttps://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/125 . So, in this issue we have to cover only the case with separators.

2. Look at all Roman's notes! You didn't do anything he wrote about.

Mark each note/question as 'done' or '????'

Ruslan Diachenko

unread,
May 29, 2014, 12:15:43 PM5/29/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
>> Ready to implement Google Java Style

Currently you are far away from this point

Макс Ветренко

unread,
May 31, 2014, 1:29:26 PM5/31/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com

Roman, this is the answer for your proposal: 

>> 3) we need to somehow markin that table :


https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage


I have done the update for Wiki page. Please, look at it. I think, that it doesn't make any sense to use some symbols or images for that. This is inconveniently to use symbols or images because reader have to know all definitions. 


Also I have fix these mistakes:

>> Stable Guava Libraries. ===> Stable Guava source  for v17.0. 

>> The following issue already existshttps://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/125 . So, in this issue we have to cover only the case with separators.


P.S. Ruslan, let's have a Skype call tonight, I have a question about JU method names.

Макс Ветренко

unread,
May 31, 2014, 4:24:13 PM5/31/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Skype Summary with Ruslan:
1. Need to investigate File encoding: UTF-8. Is there any way to check file encoding 
2. Correct links in Naming section. 

Ruslan Diachenko

unread,
May 31, 2014, 4:30:28 PM5/31/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
You forgot to mention about usage of readable symbols for check's coverage instead of a plain text as it is now

Roman Ivanov

unread,
Jun 1, 2014, 11:32:28 AM6/1/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
 vmesto "Exiting Check covers all % of requirements from Google." i podobnyh nado sdelat` ikonku - zeleny, zelty, krasnyj.... kruzochek i ih ispolzovat` v tablitse kak pervyj simvol .
I did a change at your wiki  - please extend this to the rest of cells.
Update legend to describe what circles mean.

Макс Ветренко

unread,
Jun 1, 2014, 11:36:45 AM6/1/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
I understand your proposal, I'll do it after finishing my practice report.

Ruslan Diachenko

unread,
Jun 2, 2014, 2:55:02 AM6/2/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Max,

I looked through the Google style guide and your wiki one more time. Here're my notes/questions:

0) 2.3.2 Special escape sequences - I think we can look through string literals and check it
1) 2.3.3 Non-ASCII characters - for the string literals with non-ascii characters we can try to check if there any comment exists
2) 3 Source file structure - you missed this "Exactly one blank line separates each section that is present". Also DeclarationOrder check doesn't cover license, package, imports, etc. It works only with class members.
3) 3.3.1 No wildcard imports - you missed the requirement with static imports
4) 3.3.3 Ordering and spacing - you missed this "each group separated by a single blank line"
5) 3.4.2 Class member ordering - it is more like advice, change your description
6) 4.8.2.2 Declared when needed, initialized as soon as possible - what about max distance between variable declaration and its first usage?
7) 4.8.4 Switch statements - it just describes a terminology, change your description
8) 5.1 Rules common to all identifiers - the item 5.2 and its sub-items already include these rules. Do we really need to create a new IdentifiersName check?
9) 5.2.3 Method names - please discuss with Roman
10) 6.3 Static members: qualified using class - where is the link to a new check?

Please look through all of them and try to resolve them till our Skype call today.

If you have any questions ask them here! Mark each note/question as "done" or "need to discuss"

Макс Ветренко

unread,
Jun 2, 2014, 1:01:45 PM6/2/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Monday report:

0) ???????? Need to discuss

1) I think, that commet checking doesn't give us any result. Commet can't give us any assurance. 

2) It doesn't necessary to cover import and package declaration, because we can't declare package after import. It will be a syntax error. Import ordering is implemented in 3.3.3 Ordering and spacing. So we have to cover license declaration and Exactly one blank line separates each section that is present. Line separates is not available in Checkstyle, so we have to implement new Check: ExactlyOneBlankLineSeparate.  In this note I have only one question. It's about License. What Check we have to use? Header or RedexpHeader?

3) Google says, that wildcard imports, static or otherwise are not used. And existing Check covers all requirements.   

4) Done. 

5) Done.

6) ???????? Need to discuss

7) Done.

8) Done.

9) MethodNameAwareOfJunitExtendedCheck - new Check to cover http://google-styleguide.googlecode.com/svn/trunk/javaguide.html#s5.2.3-method-names . Investigate how junit 3 detect test methods. 

10) Done.



Update Wiki. Added markers. 


Skype summary with Roman:


We discussed Unit method and we concluded, that it's necessary to create new Check MethodNameAwareOfJunitExtendedCheck to cover rule. Check will detect JUnit4 method by @test, and JUnit3 method by class name, extended class, imports (junit.framework) and modifiers (public void, maybe final) . 

Макс Ветренко

unread,
Jun 2, 2014, 3:32:54 PM6/2/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com

Roman Ivanov

unread,
Jun 2, 2014, 8:15:00 PM6/2/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,
It is a rule that we can check,

We need to focus only on String Literals - new check ForbidEscapedUnicodeCharactersCheck

Options:
boolean - allowIfAllCharactersEscaped. To cover cases like:
return '\ufeff' + content; // byte order mark

ONLY, future plan (if Baratali finish Comments support), not for now:
boolean - allowByTailComment. To cover cases like:
String unitAbbrev = "\u03bcs"; // "μs"

thanks,
Roman Ivanov

Roman Ivanov

unread,
Jun 2, 2014, 8:18:40 PM6/2/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,

As we experience performance/progress problem with GSoC you are switched from 2 time per week reporting 
to each day reporting with specifying exact task/problem you did per day and number of hours you spend on that task.

We need to see where you lost most of the working time, to help you work more productive.

thanks,
Roman Ivanov

Roman Ivanov

unread,
Jun 3, 2014, 3:14:40 AM6/3/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,

>>2.3.2 Special escape sequences There is no requirements in this paragraph, only advice.

It is a new Check.

>>2.3.3 Non-ASCII characters There is no requirements in this paragraph, only advice.

It is a new Check.

>>3 Source file structure DeclarationOrder. New Check is required: ExactlyOneBlankLineSeparat

DeclarationOrder does not help there, it is controlled by just java compiler.

>> 3.1 License or copyright information, if present This rule is already investigated in Source file structure.

"If present" mean that Checkstyle could not guess that comment is License or not, and even under different licenses.
"If present" - mean you can not demand this, and as you can not distinguish it from any other comment - we can not cover that rule.
It is not a rule.

>> We can suggest existing Check: ArrayTrailingComma
>> Exiting Check covers all % of requirements from Google.
Missed image instead of text.


thanks,
Roman Ivanov

Макс Ветренко

unread,
Jun 3, 2014, 10:12:01 AM6/3/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
report:
1. JUnit4 investigation 1 hour:  http://www.vogella.com/tutorials/JUnit/article.html
2. Correct Wiki page 20 minutes: https://github.com/maxvetrenko/checkstyle/wiki/Google's-Java-Style-Checkstyle-Coverage . Makes icons smaller, updated 2.3.2, 2.3.3, 3.1, 4.8.3.1 rules. 

Have a question: 
>> DeclarationOrder does not help there, it is controlled by just java compiler.

We don't need this Check in this case at all, does it? 

Sorry for this little daily report. Suddenly plan have changed and I must write my diploma report for two days... 

Ruslan Diachenko

unread,
Jun 3, 2014, 10:22:20 AM6/3/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
>> We don't need this Check in this case at all, does it? 

Yes, it doesn't help us in this case

Ruslan Diachenko

unread,
Jun 3, 2014, 10:26:19 AM6/3/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Max,

According to this:

>> >>2.3.2 Special escape sequences There is no requirements in this paragraph, only advice.
>> It is a new Check.

Макс Ветренко

unread,
Jun 4, 2014, 7:10:05 AM6/4/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
>>Yes, it doesn't help us in this case
I think, any possible rules are covered in next subparagraph.  

Макс Ветренко

unread,
Jun 4, 2014, 1:30:37 PM6/4/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Today I cannot report anything because I was extremely busy with my thesis work. I am sorry... I'll continue the job tomorrow. 

Roman Ivanov

unread,
Jun 4, 2014, 6:01:30 PM6/4/14
to Макс Ветренко, checksty...@googlegroups.com, Ruslan Diachenko
Hi Max,

>> I think, any possible rules are covered in next subparagraph.

DeclarationOrderCheck right now is not covering "Exactly one blank line separates each section that is present." - that should be added to new Check, as it is not related to declaration order. 

check should take care of spaces between blocks -  package, whole imports, class, methods, fields - all that are options for users in Check.
Check could be named as EmptyLineSeparatorcheck.

thanks,
Roman Ivanov

Макс Ветренко

unread,
Jun 5, 2014, 10:20:38 AM6/5/14
to checksty...@googlegroups.com
Thursday report:

Compare JUnit3 and JUnit4. My investigations:

1. JUnit3:
a. JUnit3 class have to import junit.framework.TestCase
b. JUnit test must be public void and test name have to start with "test".
c. Test class must extend TestCase.

2. JUnit4:
a. Test method must have annotation @Test.
b. Test Class can include next annotations: @Test, @Before, @After, @BeforeClass, @AfterClass, @Ignore.
c. JUnit4 Test Class have imports as org.junit.*

All this investigation takes an hour, because I investigated different cases and I think, that it's enough to detect JUnit3 and JUnit4 test methods and classes. We have to provide new Check to cover JUnit method names. If user wants to override at-clause annotation, future Check will have ability to work with custom annotations. For JUnit3: if user extends some class that extends TestCase, Check will have ability to work with such classes.
We have familiar existing issue: https://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/80

So, today I''ll investigate this Check and try to make it work.

Макс Ветренко

unread,
Jun 5, 2014, 12:18:34 PM6/5/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
This Check https://github.com/sevntu-checkstyle/sevntu.checkstyle/issues/80 has successfully passed all JUnit tests.. I don't understand what's wrong. 

Roman Ivanov

unread,
Jun 5, 2014, 12:28:30 PM6/5/14
to Макс Ветренко, checksty...@googlegroups.com
Hi Max,

>> JUnit test must be public void and test name have to start with "test".
What about other modifiers ? static , final , synchronized .... 

thanks,
Roman Ivanov.

Roman Ivanov

unread,
Jun 5, 2014, 12:30:14 PM6/5/14
to Макс Ветренко, checksty...@googlegroups.com, Ruslan Diachenko
Hi Max,

>>  I don't understand what's wrong.

Call Daniil Yaroslavtsev for details.

thanks,
Roman Ivanov

Макс Ветренко

unread,
Jun 5, 2014, 12:32:06 PM6/5/14
to checksty...@googlegroups.com, maxvetr...@gmail.com
In different tutorials I found only about public and void. 
I'll investigate another modifiers and provide results. 

Макс Ветренко

unread,
Jun 5, 2014, 4:46:17 PM6/5/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
I spoke with Daniil, he said, that Check is ready for pull request. But it's necessary to refactor one variable. I'll test this Check on Guava and provide results. 

Roman Ivanov

unread,
Jun 5, 2014, 6:16:30 PM6/5/14
to Макс Ветренко, checksty...@googlegroups.com, Ruslan Diachenko
Hi Max,

move that code to your repository, you will provide fix for it during implementation stage.
Put issue to your issue tracker to refactor it and make it ready for  pull request as any other new Checks that you will introduce.
Update your wiki appropriately.

thanks,
Roman Ivanov

Макс Ветренко

unread,
Jun 6, 2014, 2:14:12 PM6/6/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
I think it's necessary to update this Check to cover JUnit3 name convention. And we have to update this to skip JUnit methods. Or this Check will warn on test methods. 
I investigated test methods and modifiers. 
Test method can be: final, synchronized,
Test method can't be: protected, private. 

I moved this in my repo.

Please. Look at my Wiki. Am I ready? If not, please, let's have a Skype call or write me my mistakes. I really want to start coding.

Roman Ivanov

unread,
Jun 6, 2014, 3:00:38 PM6/6/14
to Макс Ветренко, checksty...@googlegroups.com, Ruslan Diachenko
Hi Max, 

1) I asked you to test over all modifiers of java - http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Modifier.html
do it.​


2)  it is the same requirements - no need for extra Check.
2.1 File name OuterTypeFilename
3.4.1 Exactly one top-level class declaration New Check is required: OneTopLevelClassDeclaration

3) 
>>Am I ready?

You are almost ready - you can start implementation from the most simple checks and configurations.
Wiki page will be reviewed few times by me and Ruslan to be sure that we did not miss anything. Please do Wiki updates with highest priority if they appear.

Roman Ivanov

unread,
Jun 6, 2014, 3:02:51 PM6/6/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,

from wiki.

>> 4.5.1 Where to break OperatorWrap.  New Check is required:ForbidTokensAtLineEnd

so, what is a final decision ?

Roman Ivanov

unread,
Jun 6, 2014, 11:02:53 PM6/6/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,

1) Change plan:
you need to split implementation in two phases:
- configure all existing checks first as it will show additional missed points to cover;
- implementing new and updating existing Checks;

By means on this approach mentors will be able to recheck how checkstyle behave on Guava project for already existing checks.

2) Update plan:
Put in plan list of issues to resolve for existing checks, search over github and sourceforge for used Check (as you already know them) and make list of issues you need to resolve. This will be third phase of your practice.

3) 
Updates to wiki:
4.6.1 - incorrect mapping to check. - RegExp can not do that.

4.7 and 4.6.3 are not a rules and just optional recomendations - marked differently in table. The same marking should be used.

4.8.1 - incorrect Check usage . - There is no reference to ","  in Google's style.

4.8.3.1 - incorrect Check usage - There is no reference to ","  in Google's style.

4.8.5 - incorrect Check usage - I do not understand how you are going to cover that guides by that Check.

4.8.6.1- incorrect Check usage - it is impossible to do now by Checkstyle.

Roman Ivanov

unread,
Jun 7, 2014, 1:40:20 PM6/7/14
to checksty...@googlegroups.com, Макс Ветренко, Ruslan Diachenko
Hi Max,

please make a note in Plan that in a phases of "updating existing Checks" and "creating new Checks". The easiest Check/updates should be done first!!!

thanks,
Roman Ivanov

Roman Ivanov

unread,
Jun 7, 2014, 8:01:41 PM6/7/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,

please update your guava's pom.xml to skip "Files" block, mentor need to focus on how each Rule affect project validation. 
"Files" block is useless.
Please regenerate report.

Expected configuration: 
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.12.1</version>
        <configuration>
          <configLocation>checkstyle_google_style.xml</configLocation>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

Sources: 

thanks,
Roman Ivanov

Макс Ветренко

unread,
Jun 8, 2014, 7:14:47 AM6/8/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
1. Remove Files block in html report: http://maxvetrenko.github.io/

2. JUnit with different Modifiers  :
- abstract - unacceptable modifier  
- final - acceptable modifier  
- interface - unacceptable modifier  
- native - unacceptable modifier  
- private - unacceptable modifier  
- protected - unacceptable modifier  
- public- acceptable modifier  
- static - unacceptable modifier  
- strict - unacceptable modifier 
- synchronized - acceptable modifier 
- transient - unacceptable modifier
- volatile - unacceptable modifier

3. >> 4.5.1 Where to break OperatorWrap.  New Check is required:ForbidTokensAtLineEnd
so, what is a final decision ?

OperatorWrap covers operator warp requirements, and ForbidTokensAtLineEnd - separator warp requirements.  So, I think, that we need both Checks. Or we can make update for OperatorWrap to cover separators

4. Updated plan. Create three big sections: Create .xml configuration for all existing Checks, Update existing Checks and create new Checks, Recheck all Checks at are used in Googe Style for open issues.  Update existing Checks and create new Checks section include: update/create UTs for Checks, update/create Checks, update .xml config after any new update, integration testing on Guava stable 17-0, update html docs. Added issues lists in all "create/update" point.

5. I need a Skype call tonight, because I have some misunderstandings. 

Roman Ivanov

unread,
Jun 8, 2014, 2:03:15 PM6/8/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max, 

>> 4. Updated plan.

I need exact list issues on checksyle's github or sourcesforce that you will fix. 


>> So, I think, that we need both Checks.

We need to talk.

>> From My post: >> 3) Updates to wiki:

Still not done.

Thanks,
Roman Ivanov

Roman Ivanov

unread,
Jun 8, 2014, 6:42:36 PM6/8/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,


please move all created by you issues from sevntu-checkstyle to maxvetrenko account.
During GSoC you do update to Checkstyle project but not sevntu.checkstyle.

By the way, name of the check clearly say Junit4 it is different Check. 

thanks,
Roman Ivanov

Roman Ivanov

unread,
Jun 8, 2014, 7:11:09 PM6/8/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
Hi Max,

from wiki.


It might be much easier to implement it by using special user-defined patterns to distinguish Test classes from  others.

private Pattern mValidTestClassNameRegex = Pattern
            .compile(".+Test|Test.+|.+IT|.+TestCase");

Names of methods could contain following symbols:

The "Java letters" include uppercase and lowercase ASCII Latin letters A-Z (\u0041-\u005a), and a-z (\u0061-\u007a), and, for historical reasons, the ASCII underscore (_, or \u005f) and dollar sign ($, or \u0024). The $ character should be used only in mechanically generated source code or, rarely, to access pre-existing names on legacy systems.             


So we could go with just make Check that apply RegExp to name only after RegExp matched to Class name - CustomMethodNameCheck .
with two options :
classRegExp - to match Test class, default value ".+Test|Test.+|.+IT|.+TestCase"
methodNameRegExp - to match method name, user could make value like "(test_[a-zA-Z_])|[a-zA-Z]" to allow "_" in name

But this Check could be used in any other use-cases, for example allow "$" in some class methods that are generated or ..... .

Rationale:  it very difficult to decide is method is test for UT or not without bitecode analyse. Checkstyle have no such abilities.
So we have to rely on names and let user help to detect UT classes. An finally - if "_" is allowed in names of tests why we have to restrict its usage in private methods of UT class and allow in public ? - No reason. So we should not do this.

thanks,
Roman Ivanov

Макс Ветренко

unread,
Jun 11, 2014, 3:00:01 PM6/11/14
to checksty...@googlegroups.com, maxvetr...@gmail.com, rd....@gmail.com
1. Annotations. I have carefully read this paragraph and I have concluded, that it's not a rule, only advice. "single parameterless annotation may instead appear together with the first line of the signature", " multiple annotations (possibly parameterized) may be listed on the same line", "There are no specific rules for formatting parameter and local variable annotations.". Google says, that thees are not a rule. So, it's only advise.  If I am right, approve my conclusion and I'll change following chapter in my wiki. Or let's discuss this question in Skype call. 

2. I have update my plan. Now, it contains bug list for existing Checks. I have made a big investigation of github issues, sourceforge bug tracker and sourceforge feature-requests. I provided this list in the end of my plan. Now my plan contains almost all links and I start to implement simple issues. In a few days I'll provide first results. 

3. Updated my Wiki. One misunderstanding  in 4.6.1 Vertical Whitespace. I don't know how to implement this rule. But I think, that it's not rationale to stop on this point. This rule may be investigate during simple Check implementation. 

>> Form Roman - Updates to wiki
Update Wiki. As for 4.8.6 Annotations I provide my ideas in the beginning of my report. 4.7, 4.6.3, 4.8.1, 4.8.3.1, 4.8.6.1 - fixed. 

4. Form Roman >> So we should not do this.
We should not implement this rule at all or we should not implement some cases? I don't understand, please, explain it.

It is loading more messages.
0 new messages