GSoC 2017 - Practice What You Preach (part 1)

瀏覽次數:153 次
跳到第一則未讀訊息

Roman Ivanov

未讀,
2017年5月31日 上午9:31:162017/5/31
收件者:checkstyle-devel、Валерия Васильева
Hi Valeria,

All discussions between you and me should be in public - github issue or mail-list. 
So we will use this thread for:
- status report on Monday and Thursday (just brief summary of what was done)
- any questions that are off-topic in github issues, or .... .

Links:

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年5月31日 下午5:04:502017/5/31
收件者:checkstyle-devel、valeria....@gmail.com
Hi, 
You wrote in the mail:
>lets create as much issues as we have profiles, to ease our understanding of of what is done and what is left.

I created issues for non-check code profiles:

Roman Ivanov

未讀,
2017年5月31日 晚上8:26:442017/5/31
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

All issues are assigned to project and labeled.
You are ok to start bombarding with PRs for each class in that profiles.
Each PR should improve coverage and raise threshold.
To avoid conflicts between PRs , so speed up merge process, please do not send two PRs for the same profile (in this case you will have conflict at mutationThreshold line and probably in list of targetClasses, so will demand rebase)

So to avoid conflicts please do fix for class in one profile, do PR, do fix for class in another profile, send PR, ......
I recommend to make easy fixes first.

Attention: please postpone gui package coverage to the very end, it does not contain code that all uses use, it is code to ease development of Checkstyle project only, so priority is low.

​thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年6月1日 凌晨1:45:352017/6/1
收件者:Roman Ivanov、checkstyle-devel
Got it.

чт, 1 июня 2017 г. в 3:26, Roman Ivanov <romani...@gmail.com>:

Roman Ivanov

未讀,
2017年6月2日 晚上11:29:262017/6/2
收件者:checkstyle-devel、romani...@gmail.com
Hi Valieria,

Status Report is required each thursday and monday.

thanks,
Roman Ivanov

Roman Ivanov

未讀,
2017年6月3日 凌晨1:02:282017/6/3
收件者:checkstyle-devel、romani...@gmail.com
Hi Valeria,

as we discussed before please try to focus on non-checks profiles for pitest

pitest-checkstyle-common
pitest-checkstyle-main
pitest-checkstyle-tree-walker
pitest-checkstyle-api
pitest-checkstyle-filters
pitest-checkstyle-utils

it is expected changes in this packages for GSoC projects, so it will minimize your work and will force others to write more tests :) . 

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年6月6日 凌晨2:41:052017/6/6
收件者:checkstyle-devel、romani...@gmail.com
Status report:
1) created pitest profile for non-checks code
2) created pitest profile for annotations package
3) increased mutation coverage of pitest-checks-common profile from 84 to 94%
4) increased mutation coverage of pitest-checkstyle-common profile from 78% to 84%, responding to review
5) working on main profile and common profile

Валерия Васильева

未讀,
2017年6月8日 下午3:01:312017/6/8
收件者:checkstyle-devel、valeria....@gmail.com
Hi,
Here is my Thursday status report:
1) Increase coverage of pitest-checks-common profile to 85% 
2) Increase coverage of pitest-checks-common profile to 89% responding to review
3) Increase coverage of pitest-checks-utils profile to 49%  responding to review
4) working on main profile, common profile, utils profile

Валерия Васильева

未讀,
2017年6月12日 下午6:29:212017/6/12
收件者:checkstyle-devel、valeria....@gmail.com
Hi,
Here is my Monday status report:
1) Increase coverage of pitest-checkstyle-common profile to 89% responding to review.
2) Increase coverage of pitest-checkstyle-utils profile to 49%.
3) Increase coverage of pitest-checkstyle-utils profile to 67% responding to review.
4) Working on utils profile.
5) Investigating pitest-checkstyle-api profile, as it may be reasonable to split it and add classes to another profiles which they connected to.
6) Investigating pitest-checkstyle-main and pitest-checkstyle-common profiles in scope of conflict between powermock and cobertura which causes build to fail.

Roman Ivanov

未讀,
2017年6月12日 晚上7:11:432017/6/12
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

please also mention how much percentage you raised ....Example:  +5% to 89%

5) Investigating pitest-checkstyle-api profile, as it may be reasonable to split it and add classes to another profiles which they connected to

please give example. api package classes are common to all, so it will be not trivial.

profiles in scope of conflict between powermock and cobertura which causes build to fail.

build failure should be resolved now.

thanks
Roman Ivanov

Валерия Васильева

未讀,
2017年6月15日 下午5:30:532017/6/15
收件者:checkstyle-devel、valeria....@gmail.com
1)The proplem with builds was resolved somehow. The only difference between systems is maven version:
maven 3.3.9 ubuntu build failed
maven 3.2.1 centos build pass 
2) All #4433 pull request build and review issues were fixed, waiting for approve or further review. Profile pitest-checkstyle-common coverage was increased by 5% in scope of this PR, current threshold is 89%.
3) All #4446 pull request build and current review issues were fixed, waiting for your review.  Profile pitest-checkstyle-utils coverage was increased by 18% in scope of this PR, current threshold is 67%.
4) The coverage of pitest-checkstyle-tree-walker was increased by 12%, current threshold is 89%. Excluded Main class and MainTest from this profile, as it was added previously by mistake. Waiting for your review.
5) Profile pitest-checkstyle-api and pitest-checkstyle-filters were united, as it has increased line coverage of api package by 23% (was 67%, became 90%) and mutation coverage by 27% (was 45%, became 72%). Pitest-checkstyle-api has more common with pitest-checkstyle-filters profile than with any other. Adding single classes to various profiles separately didn't gave such effect as was achieved by union.
6) Currently I'm working on mutation coverage increase of api package.

Валерия Васильева

未讀,
2017年6月19日 下午5:01:412017/6/19
收件者:checkstyle-devel、valeria....@gmail.com
Hi, here is my Monday report:

1)PRs:
#4455 pitest-checkstyle-tree-walker
#4446 pitest-checkstyle-utils
#4433 pitest-checkstyle-common
are waiting for your review.

2) The coverage of pitest-checkstyle-api-filters was increased by 4%. Current state: on review.

3) Some patches cannot be applied because of previous PRs on their branches still not closed:
patch-1: issue#4395: Increased pitest-checkstyle-utils mutation coverage to 99%

4) The work on pmd was started, maven pmd plugin was upgraded from 3.7 to 3.8, version of pmd was bumped to 5.7.0 manually, by adding a dependency to maven pmd plugin.
Currently investigating releasing pmd test suppress and fixing production code violations. 

Roman Ivanov

未讀,
2017年6月21日 下午5:09:072017/6/21
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

this week is 4th

according to our plan, we a bit behind a plan.
Pitest was planned to be done during 1-3 week.
PMD during 4th week.

I kind of understand that first task get extra penalty for project introduction to requried deep level.
Please find me in chat to discuss:
- what kills your productivity
- your ideas on how to catchup.

thanks,
Roman Ivanov

Roman Ivanov

未讀,
2017年6月21日 下午5:19:212017/6/21
收件者:Валерия Васильева、checkstyle-devel
Hi,

just FYI, from proposal document:

Pitest
Timeline: Week 1-3. till june 18th.

PMD
Timeline: Week 4. till june 25th.

Huntbugs and Spotbugs
Timeline: Week 5-6. till July 9th
 
Jacoco
Timeline: Week 7-8. till July 23th

IntelliJ IDEA Inspection
Timeline: Week 9-10. till August 6th

Sonar
Timeline: Week 11-12. till August 20th
 
Eclipse
Timeline: Week 13-14. till August 31th

​thanks,
Roman Ivanov

Roman Ivanov

未讀,
2017年6月22日 晚上9:56:092017/6/22
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

please confirm that to complete PMD phase you have all answers from me (what to do with each violation).
We need to finish PMD on this week.

Next week we should start "Huntbugs and Spotbugs" , on Monday please investigate tools.
try to run and share reports on Monday with me to let me give you instructions what should be fixed and what should be suppressed.
during pauses with "Huntbugs and Spotbugs" please continue with pitest.

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年6月23日 上午10:18:072017/6/23
收件者:checkstyle-devel、valeria....@gmail.com
Hi,

There are some violations marked by me as  tentative. You haven't mention them in your comments. I shared the report on them here.
All others will be fixed.
Ok, on Monday I will start with Huntbugs and Spotbugs.

Also my Thursday status report:
1) The pmd version was bumped to 5.7.0 and the maven-pmd-plugin to 3.8
2) All production code violations were fixed, waiting for review.
3) Separate configs for pmd test and pmd main were created, pmd was enabled on test code, all pmd test violations were suppressed, tasks for fixing them were created.
4) The coverage of pitest-checkstyle-utils profile was increased by 32%, current threshold is 99%.
5) The coverage of pitest-checkstyle-common profile eas increased by 2%, current threshold is 92%.

Roman Ivanov

未讀,
2017年7月2日 下午1:30:332017/7/2
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

I do not see reports from you. Please keep doing it. 

thanks,
Roman Ivanov

Roman Ivanov

未讀,
2017年7月2日 晚上10:40:472017/7/2
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

I changed scheduler in your proposal document, I postponed Jacoco to be the last project.

Reasons:
- it should be done last as release with new filter features is expected soon; 
- we need to finish pitest coverage before we come to jacoco; 
- Jacoco is known for its conflict with PowerMock that we use heavily; 
- I will be on vacation first two weeks of August to return from vacation before you start jacoco

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年7月3日 凌晨3:14:402017/7/3
收件者:checkstyle-devel、valeria....@gmail.com
Hi, 

Here is my Monday report:

1) Almost all pmd violations (except TreeWalker pull#4565) were fixed.
2) Spotbugs support was added to the project.
3) Hundbugs was skipped, as it is dead already.
4) Currently I am working on pitest fixes, the situation with coverage is as follows:

Валерия Васильева

未讀,
2017年7月7日 上午9:18:172017/7/7
收件者:checkstyle-devel、valeria....@gmail.com
Hi,

Here is my Thursday-Friday report:
1) All PMD violations were fixed.
2) Pitest coverage was increased on such profiles:
  a) pitest-checkstyle-common up to 100% 
  b) pitest-checkstyle-utils up to 100%
  c) pitest-checkstyle-api-filters up to 90%
  d) pitest checkstyle tree-walker up to 94%

Roman Ivanov

未讀,
2017年7月9日 下午1:04:142017/7/9
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

new issue for IntelliJ IDEA phase of GSoC:
https://github.com/checkstyle/checkstyle/issues/4681 - "review all suppressed IntellijIdea inspections with comment 'till ...'"
https://github.com/checkstyle/checkstyle/issues/4682 - "find way to launch IntellijIdea inspections from command line"

if you become blocked by my decision on how to fix, please continue with pitest coverage.

thanks
Roman Ivanov

Валерия Васильева

未讀,
2017年7月12日 上午11:46:272017/7/12
收件者:checkstyle-devel、valeria....@gmail.com
Hi,

Here is my report:

1) Profile pitest-checkstyle-api-filters was divided to two separate profiles
2) pitest-checkstyle-filters profile coverage was increased to 100% by adding suppressions.
3) pitest-checkstyle-main profile coverage was increased to 100% by adding suppressions.
4) Currently, review of IntelliJ IDEA issues is being held, report on documented issues is created. Undocumented violations are being reviewed.
5) Working on pitest-checkstyle-api and pitest-checkstyle main profiles

Roman Ivanov

未讀,
2017年7月13日 晚上9:32:452017/7/13
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

Please make a reminder for yourself to send report on Monday and Tuesday .

To speed up process of reports generation, please just make changes in inspection config and send PRs , Teamcity will do reports for you. In PRs description make a note that changes are only to generate report on TC and not for merge.

All changes for simple comment in config to support suppression should be done without any changes in code. Do it ASAP for all inspections. All inspections that still do not have comment should stay active in config.

After merge of any PR with functional config change or change of code, do changes in PRs for reports to keep them up-to-date, it should be like a to-do list for you to clear see items that are not done. 

Thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年7月14日 凌晨4:29:442017/7/14
收件者:checkstyle-devel、valeria....@gmail.com
Hi,

Here is my Thursday report:

1) Several reports on IDEA violations were created
2) Abstraction IDEA violations were fixed (on review)
3) One part of mixed IDEA violations was fixed (on review)
4) Coverage of pitest-checkstyle-api was increased by 8%, current threshold: 96% (on review)

Валерия Васильева

未讀,
2017年7月17日 中午12:47:132017/7/17
收件者:checkstyle-devel、valeria....@gmail.com
Hi,

Here is my Monday report:

1) Reports on all undocumented IDEA violations were created and organised to groups.
2) Code style IDEA violations were fixed.
3) Half of the seventh part of IDEA violations was fixed.
4) Half of the fifth part of IDEA violations was fixed.
5) Coverage og pitest-checkstyle api profile was increased by 4%, current threshould: 100% (one mutation left).

R Veach

未讀,
2017年7月20日 清晨7:47:092017/7/20
收件者:checkstyle-devel、valeria....@gmail.com
@Nimfadora
https://github.com/checkstyle/checkstyle/pull/4751#discussion_r128491543
Please see top part of post for issue with pitest.
https://master-pitreports.netlify.com/

>100% - 211/212

Pitest rounds percentages up. 211 != 212, so it should never have said this coverage was 100%.
This caused an issue in another PR where mutation numbers decreased, but remained 1 off. It finally recalculated it as 99% in the PR, but now we must reduce coverage in config because of this if PR is merged.

When you are doing more pitest updates, please only put 100% if it is truly all mutations covered.
You will need to verify this manually.

I am asking @romani if we should re-verify the ones that are 100% are truly 100% and not rounded up as they may cause issues too.

Roman Ivanov

未讀,
2017年7月20日 中午12:01:512017/7/20
收件者:R Veach、checkstyle-devel、Валерия Васильева
I most likely related to https://github.com/hcoles/pitest/issues/375
nothing we can do with it, till it fixed.

Valeria need to reach to 100 in the way plugin allow this, even incomplete.

tree-walker profile is set to 100% but there are some excludes in methods , so work in not completed.
So we have not good state from both sides, so we will need to address unexpected situations .... case by case and search for workarounds case by case. 

Roman Ivanov

未讀,
2017年7月21日 下午1:14:512017/7/21
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com
Hi Valeria,

I do not like the performance of your work, we are seriously behind schedule for no good reason.
You even ignore our demand for reports 2 times per week again again and again ...

from this day on, you need to provide DAILY(each day) report of what you accomplished and where(certain problem) you loss/spend a time. 
if we will not catch up with schedule till the end of the month I will demand details of each hour that you spend to see where inefficiency of spent time happens.

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年7月21日 下午4:29:082017/7/21
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com
Hi, 
Here is my Thursday report:

1) All violations (16 cases) from the fourth part of IDEA violations were fixed.
2) All violations (30 cases) from the third part of IDEA violations were fixed.
3) SimplifiableIfStatement and MissingPackageInfo violations from the seventh part of IDEA violations were fixed.
4) Last mutation from pitest-checkstyle-api profile was fixed
5) Coverage of pitest-checkstyle-filters profile was increased by 5%, current threshold: 100%

Валерия Васильева

未讀,
2017年7月21日 下午5:28:472017/7/21
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com
Hi,
Here is my Friday report:

1) CallToSimpleGetterInClass, MismatchedCollectionQueryUpdate, NullableProblems violations from the fifth part of IDEA violations were fixed.
2) AbstractComplexityCheck, AbstractIllegalCheck, AbstractIllegalMethodCheck, AbstractNestedDepthCheck deprecated classes were deleted.
3) EqualsReplaceableByObjectsCall violation from the seventh part of IDEA violations was fixed (1.5 spent, not obvious tests failure).
4) All remained violations (5 cases) from the ninth part of IDEA violations were fixed.
5) Coverage of pitest-checks-header profile was increased by 6%, current threshold: 100% (4 hours spent - very tricky mutations)

Валерия Васильева

未讀,
2017年7月24日 下午5:23:212017/7/24
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com
Hi,

Here is my daily report:
1) InterfaceMayBeFunctional idea violation was fixed
2) FieldNotUsedInToString idea violation was fixed
3) Several reports on violations review were created (eleventh part unreviewed violations, StringBufferMustHaveInitialCapacity, HtmlTagCanBeJavadocTag in TokenTypes)
4) Suppressions on the eleventh part of IDEA violations were added
5) HtmlTagCanBeJavadocTag idea violation was fixed
6) All violations from the sixth part of idea violations were fixed
7) MethodMayBeStatic idea violation was fixed 
8) All violations from the tenth part of idea violations were fixed
9) BooleanParameter idea violation was fixed
10) InconsistentResourceBundle idea violation was fixed

Валерия Васильева

未讀,
2017年7月26日 清晨5:52:512017/7/26
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com
Hi,

Here is my daily report:
1) Coverage of pitest-checks-annotation was increased to 100 
2) Investigated problem with pitest coverage on main profile
3) 200 AssertsWithoutMessages idea violations were fixed, and one more patch is ready to be pushed when this will be merged
4) PR fixing, till some of them are not merged I can't provide patches on next violations
5) Working on idea shell scripts

Валерия Васильева

未讀,
2017年7月27日 凌晨3:00:402017/7/27
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com

Hi,

Here is my daily report:
1) 200 more AssertsWithoutMessages idea violations were fixed
2) PR fixing
3) Coverage of pitest-checkstyle-main was increased to 100%
4) Investigating pitest-checkstyle-tree-walker profile, trying to invoke Lexer error

Валерия Васильева

未讀,
2017年7月28日 上午9:02:222017/7/28
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com

Hi, here is my daily report:
1) 300 more AssertsWithoutMessages idea violations were fixed
2) AlphaUnsortedPropertiesFile idea violation was fixed
3) EqualsUsesNonFinalVariable, HashCodeUsesNonFinalVariable idea violations were fixed
4) PR fixing

R Veach

未讀,
2017年7月30日 晚上7:43:262017/7/30
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com
Romani, Nimfadora,

Are there any checks from TC or such that will catch violations of Exceptions being declared thrown from a method, but are actually never thrown directly or indirectly?
We removed 'method can be declared static' violations from one TC inspection recently, but Eclipse is still giving me around 42 warnings that exceptions in our tests aren't actually thrown. I am hoping we can catch them in CI somehow as I have removed them before and they continue to come back and grow.

Current list:

Description    Resource    Path    Location    Type
The declared exception CheckstyleException is not actually thrown by the method testCreateModuleWithNonExistName() from type PackageObjectFactoryTest    PackageObjectFactoryTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 134    Java Problem
The declared exception Exception is not actually thrown by the method testClearChildCountCache() from type DetailASTTest    DetailASTTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/api    line 159    Java Problem
The declared exception Exception is not actually thrown by the method testCreateObjectFromFullModuleNamesWithException() from type PackageObjectFactoryTest    PackageObjectFactoryTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 172    Java Problem
The declared exception Exception is not actually thrown by the method testDefaultMultiThreadConfiguration() from type DefaultConfigurationTest    DefaultConfigurationTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 59    Java Problem
The declared exception Exception is not actually thrown by the method testFinishLocalSetupFullyInitialized() from type TreeWalkerTest    TreeWalkerTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 498    Java Problem
The declared exception Exception is not actually thrown by the method testGetAcceptableTokens() from type AbstractCheckTest    AbstractCheckTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/api    line 188    Java Problem
The declared exception Exception is not actually thrown by the method testGetClassLoader() from type AbstractCheckTest    AbstractCheckTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/api    line 164    Java Problem
The declared exception Exception is not actually thrown by the method testGetFileExtention() from type AbstractFileSetCheckTest    AbstractFileSetCheckTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/api    line 59    Java Problem
The declared exception Exception is not actually thrown by the method testGetFirstNode1() from type CheckUtilsTest    CheckUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 291    Java Problem
The declared exception Exception is not actually thrown by the method testGetMessageDispatcher() from type AbstractFileSetCheckTest    AbstractFileSetCheckTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/api    line 87    Java Problem
The declared exception Exception is not actually thrown by the method testGetTabWidth() from type AbstractCheckTest    AbstractCheckTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/api    line 140    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlank() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 312    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlankAheadWhitespace() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 318    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlankBehindWhitespace() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 324    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlankNullString() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 342    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlankWhitespaceInside() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 336    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlankWithEmptyString() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 348    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlankWithWhitespacesAround() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 330    Java Problem
The declared exception Exception is not actually thrown by the method testIsBlankWithWhitespacesOnly() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 354    Java Problem
The declared exception Exception is not actually thrown by the method testIsIdentifier() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 252    Java Problem
The declared exception Exception is not actually thrown by the method testIsIdentifierEmptyString() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 258    Java Problem
The declared exception Exception is not actually thrown by the method testIsIdentifierInvalidFirstSymbol() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 264    Java Problem
The declared exception Exception is not actually thrown by the method testIsIdentifierInvalidSymbols() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 270    Java Problem
The declared exception Exception is not actually thrown by the method testIsIntInvalidString() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 387    Java Problem
The declared exception Exception is not actually thrown by the method testIsIntNull() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 393    Java Problem
The declared exception Exception is not actually thrown by the method testIsIntValidString() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 382    Java Problem
The declared exception Exception is not actually thrown by the method testIsName() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 276    Java Problem
The declared exception Exception is not actually thrown by the method testIsNameEmptyLastPart() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 300    Java Problem
The declared exception Exception is not actually thrown by the method testIsNameEmptyPart() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 294    Java Problem
The declared exception Exception is not actually thrown by the method testIsNameEmptyString() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 282    Java Problem
The declared exception Exception is not actually thrown by the method testIsNameInvalidFirstSymbol() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 288    Java Problem
The declared exception Exception is not actually thrown by the method testIsNameInvalidSymbol() from type CommonUtilsTest    CommonUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 306    Java Problem
The declared exception Exception is not actually thrown by the method testMultiThreadConfiguration() from type DefaultConfigurationTest    DefaultConfigurationTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 68    Java Problem
The declared exception Exception is not actually thrown by the method testParseDouble() from type CheckUtilsTest    CheckUtilsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/utils    line 321    Java Problem
The declared exception Exception is not actually thrown by the method testProperties() from type ThreadModeSettingsTest    ThreadModeSettingsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 35    Java Problem
The declared exception Exception is not actually thrown by the method testResolveCheckerInMultiThreadMode() from type ThreadModeSettingsTest    ThreadModeSettingsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 42    Java Problem
The declared exception Exception is not actually thrown by the method testResolveCheckerInSingleThreadMode() from type ThreadModeSettingsTest    ThreadModeSettingsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 57    Java Problem
The declared exception Exception is not actually thrown by the method testResolveTreeWalker() from type ThreadModeSettingsTest    ThreadModeSettingsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 64    Java Problem
The declared exception Exception is not actually thrown by the method testResolveTreeWalkerInSingleThreadMode() from type ThreadModeSettingsTest    ThreadModeSettingsTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 78    Java Problem
The declared exception Exception is not actually thrown by the method testSetExtentionThrowsExceptionWhenTheyAreNull() from type AbstractFileSetCheckTest    AbstractFileSetCheckTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/api    line 74    Java Problem
The declared exception Exception is not actually thrown by the method testSetFileSetCheckSetsMessageDispatcher() from type CheckerTest    CheckerTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle    line 891    Java Problem
The declared exception Exception is not actually thrown by the method testTokens() from type AbstractJavadocCheckTest    AbstractJavadocCheckTest.java    /checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/checks/javadoc    line 180    Java Problem

Валерия Васильева

未讀,
2017年7月31日 晚上7:08:172017/7/31
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com

Hi,

Here is my daily report:

1) All AssertsWithoutMessages idea violations were fixed.
2) All issues from the fifth part of idea violations were fixed.
3) All issues from the ninth part of idea violations (last BooleanParameter violation) were fixed.
4) WeakerAccess can be private violations were fixed.
5) BooleanParameter for public methods idea violations were fixed.
6) BooleanParameter in AbstractModuleTestSupport.createChecker was fixed
 

Валерия Васильева

未讀,
2017年7月31日 晚上7:11:052017/7/31
收件者:checkstyle-devel、rvea...@gmail.com、valeria....@gmail.com
Rnveach,

Maybe, it can be resolved during Practice What You Preach eclipse part. I cannot find idea or pmd violations that will cover such cases.

понедельник, 31 июля 2017 г., 2:43:26 UTC+3 пользователь R Veach написал:

Roman Ivanov

未讀,
2017年8月2日 凌晨1:11:022017/8/2
收件者:Валерия Васильева、checkstyle-devel、Richard Veach
Hi Richard,

Are there any checks from TC or such that will catch violations of Exceptions being declared thrown from a method, but are actually never thrown directly or indirectly?

We enabled all inspections for Exceptions, 

~/java/github/checkstyle/checkstyle/config [master|✔] 
$ grep -iE "exception.*enabled=\"false\"" intellij-idea-inspections.xml 
    <inspection_tool class="UncheckedExceptionClass" enabled="false" level="ERROR" enabled_by_default="false" />

Probably there is bug in some of inspections to miss such cases. But we unlikely have a time to find a problem and report it to JetBrains.
It should be violation from BadExceptionDeclared inspection, but there are no violations from it now in code.

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年8月8日 清晨5:53:322017/8/8
收件者:checkstyle-devel、romani...@gmail.com
Hi,

Here is my daily report:

1) Several PRs: Issue #4857, Issue #4801 were fixed.
2) Pitest-checkstyle-tree-walker remained mutations were investigated.
3) WeakerAccess can be private cases were fixed.
4) Avoid boolean parameter PR is in progress, pitest fix remained.
5) Started investigation of eclipse part of Practice What You Preach.
6) Waiting for Sonar credentials.

Валерия Васильева

未讀,
2017年8月8日 下午6:13:292017/8/8
收件者:checkstyle-devel、romani...@gmail.com
Hi,

Here is my daily report:

1) Pitest mutations in PR for Issue #4709 were fixed.
2) Working on idea inspections script.
3) Working on eclipse command line inspection script.
4) Working on tree-walker pitest converage increase.

Валерия Васильева

未讀,
2017年8月10日 凌晨3:05:282017/8/10
收件者:checkstyle-devel、romani...@gmail.com

Hi,

Here is my daily report:
1) Working on eclipse command line inspection script.
2) Published  idea inspections script for windows.
3) Working on tree-walker pitest profile mutations fix.

Roman Ivanov

未讀,
2017年8月10日 凌晨4:52:312017/8/10
收件者:Валерия Васильева、checkstyle-devel
Hi Valeria,

IDEA project is not completed yet, please make sure you fix IDEA problems first.
Do not distract yourself by new projects (Sonar, Eclipse, ....) you can start them only then you blocked by me in IDEA issues.
I do not see any block in PRs, so please make sure that IDEA issues/PRs are finished.

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年8月10日 清晨5:26:222017/8/10
收件者:Roman Ivanov、checkstyle-devel
Ok, will do that.

чт, 10 авг. 2017 г. в 11:52, Roman Ivanov <romani...@gmail.com>:

Валерия Васильева

未讀,
2017年8月13日 清晨5:27:032017/8/13
收件者:checkstyle-devel、valeria....@gmail.com
Hi,

Here is my Thursday report:

1) fixed all BooleanParameter idea violations.
2) investigate MainTest.testCreateListenerWithLocationIllegalStateException.
3) Working on eclipse command line inspection script.

Валерия Васильева

未讀,
2017年8月13日 清晨5:30:242017/8/13
收件者:checkstyle-devel、romani...@gmail.com

Hi,

Here is my Friday report:

1) Investigate idea: fixing HtmlTagCanBeJavadocTag cause ant build error.
2) Report a bug to Oracle on issue #4805.
3) Working on tree-walker pitest converage increase.

Валерия Васильева

未讀,
2017年8月14日 下午4:46:372017/8/14
收件者:checkstyle-devel、romani...@gmail.com

Hi,

Here is my daily report:

1) Coverage of pitest-checkstyle-tree-walker was increased to 99% (except one method), was debugging several hours but could not find test cases for TreeWalker#isPositionGreater.
2) Searching a way to specify inspection scope in idea-inspections command line script for windows (seems that it is impossible with the latest version of Intellij IDEA).
3) Working on sonar script.
4) Waiting for romanis' reply on issues: #4842, #4805#4682, #4940, #4398

Валерия Васильева

未讀,
2017年8月16日 下午5:31:002017/8/16
收件者:checkstyle-devel、romani...@gmail.com

Hi,

Here is my Tuesday reoprt:
1) working on twelfth part of idea violations;
2) published first version of sonar script;
3) fixed PR for bugfix in TokenTypesDocklets.
4) Working on eclipse script.

Валерия Васильева

未讀,
2017年8月16日 下午5:39:202017/8/16
收件者:checkstyle-devel、romani...@gmail.com

Hi,

Here is my daily report:
1) Fixed almost all violations (except MultipleReturnPointsPerMethod) from the twelfth part of idea violations.
2) Worked on eclipse script.
3) Submitted initial script for eclipse check. 

Валерия Васильева

未讀,
2017年8月18日 上午8:51:202017/8/18
收件者:checkstyle-devel、romani...@gmail.com

Hi,

Here is my daily report:
1) Working on idea inspections (MultipleReturnCount, HtmlTagCanBeJavadocTag, ThisEscapedInConstructor)
2) Working on eclipse script

Валерия Васильева

未讀,
2017年8月22日 凌晨2:13:092017/8/22
收件者:checkstyle-devel、romani...@gmail.com

Hi,

Here is my daily report:
1) pitest-checkstyle-tree-walker PR was fixed, coverage is increased to 100%;
2) pitest-checks-misc coverage was increased by 3%, current threshold: 93%;
3) working on sonar script;
4) working on eclipse script;
5) HtmlTagCanBeJavadocTag idea violation was fixed.

Roman Ivanov

未讀,
2017年8月22日 上午8:59:442017/8/22
收件者:checkstyle-devel、romani...@gmail.com
Hi Valeria,

Priority of fixes for pitest profiles (in sequence):

    - PROFILE="-Ppitest-checks-annotation,no-validations"

    - PROFILE="-Ppitest-checks-modifier,no-validations"
    - PROFILE="-Ppitest-checks-naming,no-validations"
    - PROFILE="-Ppitest-checks-regexp,no-validations"
    - PROFILE="-Ppitest-checks-sizes,no-validations"
    - PROFILE="-Ppitest-checks-whitespace,no-validations"

    - PROFILE="-Ppitest-checks-header,no-validations"
    - PROFILE="-Ppitest-checks-imports,no-validations"
    
    # this are more complicated Checks
    - PROFILE="-Ppitest-checks-misc,no-validations"    
    - PROFILE="-Ppitest-checks-metrics,no-validations"
    - PROFILE="-Ppitest-checks-blocks,no-validations"
    - PROFILE="-Ppitest-checks-design,no-validations"
    - PROFILE="-Ppitest-checks-coding,no-validations"   

    # could be skipped as whole Check probably need to be redesigned
    - PROFILE="-Ppitest-checks-indentation,no-validations"

thanks,
Roman Ivanov

Валерия Васильева

未讀,
2017年8月29日 凌晨2:53:102017/8/29
收件者:checkstyle-devel、romani...@gmail.com

Project Name: Practice What You Preach

Project idea

Quality of source code can be examined by many different tools, Checkstyle is one of them, but not the only one. Checkstyle team uses its own tool to check its sources. But there is no limit to perfection and we can make Checkstyle source code even better than it is now. The idea is to reuse and configure some other well-known static code analysers (PMD,  Sonar, Eclipse, IntelliJ IDEA Inspection, HuntBugs, SpotBugs, Pitest) to run all rules, checks, inspections, validations, mutations on Checkstyle main and test source code at each pull request to ease and speed-up code-review or patch acceptance process. Usage of such tool allow author receive first feedback on his changes in short period of time (as soon as automated validation finish)  and allow maintainers to review code with full focus on design issues that neither of such tools could validate.


Plan

Project was splitted to several parts, each of them includes interaction with some specific tool:

  1. Pitest

  2. PMD

  3. HuntBugs and SpotBugs

  4. IntelliJ IDEA inspections

  5. Sonar

  6. Eclipse

  7. Jacoco


Pitest


Pitest is all about mutation testing. This tool mutates the code in several different ways (see mutators) and checks if any test fail after this mutations.


The goal of this part of the project was to increase code mutation coverage to 100%, so that every mutation will break some test.


In scope of this part of the project such commits were merged:

add pitest non-checks code profiles

add pitest-checks-annotation profile

increase mutation coverage of pitest-checks-header profile to 94%

increase coverage of pitest-checks-common profile to 85%

increase coverage of pitest-checkstyle-utils profile to 49%

increase coverage of pitest-checkstyle-common profile to 89%

increase coverage of pitest-checkstyle-utils profile to 67%

increase coverage of pitest-checkstyle-tree-walker profile to 89%

united api and filters profiles, increased coverage to 85%

increase coverage of pitest-checkstyle-common profile to 92%

increase coverage of pitest-checkstyle-utils profile to 99%

increase coverage of pitest-checkstyle-common profile to 95%

increase coverage of pitest-checkstyle-common profile to 98%

increase coverage of pitest-checkstyle-api-filters profile to 90%

increase coverage of pitest-checkstyle-common profile to 100%

increase coverage of pitest-checkstyle-utils profile to 100%

increase coverage of pitest-checkstyle-tree-walker profile to 94%

increase coverage of pitest-checkstyle-main profile to 100%

increase coverage of pitest-checkstyle-tree-walker profile to 100%

rearranged pitest-checkstyle-api-filters profile

increase coverage of pitest-checkstyle-api profile to 96%

increase coverage of pitest-checkstyle-api profile to 100%

fix last mutation

increase coverage of pitest-checkstyle-filters profile to 100%

increase coverage of pitest-checks-header profile to 100%

increase coverage of pitest-checks-annotation to 100%

increase coverage of pitest-checkstyle main profile to 100%

increase coverage of pitest-checks-misc to 93%

increase coverage of pitest-checkstyle-tree-walker to 100%

increased coverage of pitest-checks-regexp to 100%

increased coverage of pitest-checks-misc to 96%

increased coverage of pitest-checks-whitespace to 98%

increased coverage of pitest-checks-sizes to 100%


In scope of this part of the project such commit was proposed:

increase coverage of pitest-checks-imports to 96%

increase coverage of pitest-checks-design to 100%


Created several issues which should be resolved out of GSoC:

pitest: increase mutation coverage for pitest-checkstyle-gui profile to 100%


PMD


PMD scans source code and looks for potential problems like: possible bugs, dead code, suboptimal code, overcomplicated expressions, duplicate code.


The goal of this part of the project was to fix or suppress all PMD violations in tests.


In scope of this part of the project such commits were merged:

bumped version of pmd-mvn-plugin to 3.8 and pmd to 5.7.0

enable test checks for pmd, create separate configs and suppress all violations

suppresed production code violations as they should not be fixed

fix pmd violations for CheckstyleCustomShortVariable

fix pmd violations for CommentDefaultAccessModifier

fix pmd violations for ConfusingTernary

fix pmd violations for JUnit4TestShouldUseTestAnnotation

suppress pmd violations for NcssMethodCount

fix pmd violations for LoggerIsNotStaticFinal

fix pmd violations for UncommentedEmptyMethodBody

fix pmd violations for InsufficientStringBufferDeclaration

fix pmd violations for AppendCharacterWithChar

fix pmd violations for UselessOverridingMethod

suppress pmd violations for it package

fix first bunch of pmd violations for JUnitAssertionsShouldIncludeMessage

fix second bunch of pmd violations for JUnitAssertionsShouldIncludeMessage

fix third bunch of pmd violations for JUnitAssertionsShouldIncludeMessage

fix pmd violations for TestClassWithoutTestCases

fix fourth bunch of pmd violations for JUnitAssertionsShouldIncludeMessage

fix first part of tentative pmd violations

fix pmd dependencies which prevented it from using the latest version

fix second part of JUnitTestsShouldIncludeAssert violations

fix third part of JUnitTestsShouldIncludeAssert violations

fix AccessorClassGeneration and JUnitTestsShouldIncludeAssert violations

fix TreeWalkerTest JUnitTestsShouldIncludeAssert violations



HuntBugs and SpotBugs


SpotBugs is a program which uses static analysis to look for bugs in Java code.

HuntBugs is a new Java bytecode static analyzer tool based on Procyon Compiler Tools aimed to supersede the FindBugs


In scope of this part of the project such commits were merged:

add Spotbugs to the project


Huntbugs was investigated and discussed here. Finally, we made a decision to not use it in Checkstyle project as it is not supported and already dead.


IntelliJ IDEA inspections

IntelliJ IDEA static code analyser detects compiler and runtime errors, different code inefficiencies, unreachable code, unused code, non-localized string, unresolved method, memory leaks and even spelling problems.

The goal of this part of the project was to either fix all uncommented in Checkstyle IntelliJ config violations or suppress them with some meaningful comment.

In scope of this part of the project such commits were merged:

fixed abstraction IDEA violations

fixed code style idea violations

update suppress comment

fixed part of idea violations

fix easy cases of the fifth part of idea violations

fix easy cases of the seventh part of idea violations

add suppressions

add suppressions

fix SimplifiableIfStatement, suppress MissingPackageInfo violations

fix all violations from the fourth part of idea violations

fix all violations from the third part of idea violations

delete deprecated: AbstractComplexityCheck, AbstractIllegalCheck  

AbstractIllegalMethodCheck, AbstractNestedDepthCheck

fix CallToSimpleGetterInClass, MismatchedCollectionQueryUpdate

NullableProblems idea violations

add inspections passed without violations

fixed remained violations for the nineth part of idea violations

introduce InterfaceMayBeFunctional violation, add annotations

add suppressions on the eleventh part of IDEA violations

fix FieldNotUsedInToString IDEA violations

fix EqualsReplaceableByObjectsCall IDEA violation

fix MethodMayBeStatic idea violations

fix HtmlTagCanBeJavadocTag idea violation

fix all violations from the sixth part of idea violations

fix all violations from the tenth part of idea violations

fix first 200 AssertsWithoutMessages violations

fix InconsistentResourceBundle idea violation

fix some violations from eleventh part of idea violations

fix AlphaUnsortedPropertiesFile idea violation

fix second 200 AssertsWithoutMessages violations

fix 300 more AssertsWithoutMessages violations

fix final 300 AssertsWithoutMessages idea violations

fix EqualsUsesNonFinalVariable, HashCodeUsesNonFinalVariable...

fix all violations of BooleanParameter idea check except...

hot fix for BooleanParameter idea violation

fix avoid boolean parameters for public methods

fix some violations from the eleventh part of idea violations

add suppressions on the twelfth part of idea violations

fix HtmlTagCanBeJavadocTag idea violation for TokenTypes

fix twelfth part idea violations

fix BooleanParameter idea violation for it package

fix MultipleReturnPointsPerMethod idea violation

fix ThisEscapedInConstructor idea violation for ImportControl class

fix HtmlTagCanBeJavadocTag in TokenTypes


In scope of this part of the project such commit was proposed:

add script for checking idea inspections (for windows)


Created several issues which should be resolved out of GSoC:

idea: fix ThisEscapedInConstructor idea violation for AbstractClassCouplingCheck.FileContext class

idea: fix ThisEscapedInConstructor idea violation for AbstractLoader class

idea: fix ThisEscapedInConstructor idea violation for IndentationCheck class

 

Sonar


Sonar is one more static analyser which also detects bugs, code smells, security vulnerabilities and some more.

The goal of this part of the project was to activate Sonar for PR validation to prevent bad code leak to the project.

In scope of this part of the project such commit was proposed:

add initial scripts for running sonar in docker


Eclipse


Eclipse compiler also performs a static code analysis, detects compiler errors, bugs and vulnerabilities.

The goal of this part of the project was to introduce eclipse compiler checks to the build flow.


In scope of this part of the project such commit was merged:
add eclipse violation check as a maven plugin

In scope of this part of the project such commit was proposed:

improved some items


Jacoco


Originally there was plan to start to use jacoco code coverage tool instead of cobertura tool. But jacoco team did not make long awaited release with implemented filters that could allow checkstyle project to use jacoco without any compromise of code quality. Admins of Checkstyle project allowed to skip this sub tasks from GSoC as it does not make sense to do now.



What I get to know during GSoC


  • contribution process in github;

  • process of working on several tasks at the same time;

  • continuous integration process and automated regression testing process by means of opensource tools and free web services that have integration with github;

  • become familiar with all known opensource java static analysis tools;

  • understand that not all best practices, rules are good for particular project;

  • neither tool cover all best practices and there are a lot of overlaps between tools, but all of them have smth unique, more reliable or configurable implementations;

  • it became clear how difficult is it to resolve technical debt in existing project/code and that is not so easy to not allow it appearance during code acceptance without such checkers as static code analysers and more;

  • how to gradually (step by step) introduce new static code analysis tools to actively developed project;

  • benefits of splitting task to multiple subtasks and deliver results to acceptance to target code base as soon as some part of the work is done;

  • big patches or Pull Requests are very difficult for maintainer to review and hard to change, rebasing changes to the latest code to avoid conflicts became also very complicated for an author of a patch.  So it is very convenient to split your changes to multiple patches if possible.

Валерия Васильева

未讀,
2017年8月29日 凌晨4:07:532017/8/29
收件者:checkstyle-devel、romani...@gmail.com

Hi,

The GSoC is over and it is time to publish my final report. As it has not suit into one message, here is the link to public gist where I have described all that I have accomplished during Practice What You Preach project with Checkstyle.
Thanks to all who helped me during this summer, @romani, @rnveach and others! Hope that I helped to make Checkstyle code a bit better)

thanks,

Valeria Vasylieva
回覆所有人
回覆作者
轉寄
0 則新訊息