Caching checkstyle results; running only broken tests

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Caching checkstyle results; running only broken tests

Mirza Abbas Raza
Hi,

My apologies if this has already been addressed. I had a hard time searching it on the mailing list. Nothing novel about this - anybody using checkstyle with a non-trivial application must have seen this. 

So, checkstyle takes almost 5 minutes to run, partly because we have lots of suppressions. I want to minimize the time by letting checkstyle cache the results and run only the broken tests on the subsequent runs. Turns out, no solution is available out of the box at least based on my google search. One solution that I found online is this http://lifeisbetter.in/blog/2010/10/26/checkstyle-ant-task-run-checkstyle-only-on-modified-files/ . The issue with this solution is that if a broken test is not fixed, that test will not run again because the file was not modified. I am thinking of having a timestamp based solution. However, it there is a out of the box solution, that would be the best deal. Any pointers on existing solutions would help too. Any help appreciated.

Thanks,
Abbas


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Caching checkstyle results; running only broken tests

Oliver Burn
Hi,

I would recommend that you look into the cacheFile property on the TreeWalker module, as described at http://checkstyle.sourceforge.net/config.html.

Is this not what you are looking for?

Regards,
Oliver

On Fri, Jul 15, 2011 at 13:07, Mirza Abbas Raza <[hidden email]> wrote:
Hi,

My apologies if this has already been addressed. I had a hard time searching it on the mailing list. Nothing novel about this - anybody using checkstyle with a non-trivial application must have seen this. 

So, checkstyle takes almost 5 minutes to run, partly because we have lots of suppressions. I want to minimize the time by letting checkstyle cache the results and run only the broken tests on the subsequent runs. Turns out, no solution is available out of the box at least based on my google search. One solution that I found online is this http://lifeisbetter.in/blog/2010/10/26/checkstyle-ant-task-run-checkstyle-only-on-modified-files/ . The issue with this solution is that if a broken test is not fixed, that test will not run again because the file was not modified. I am thinking of having a timestamp based solution. However, it there is a out of the box solution, that would be the best deal. Any pointers on existing solutions would help too. Any help appreciated.

Thanks,
Abbas


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Re: Caching checkstyle results; running only broken tests

Mirza Abbas Raza
Thanks for the suggestion. I added the property for cacheFile in TreeWalker module. That did not help at all. The first run after the cache configuration took 8min and 39 sec. The subsequent run took 8min and 17 sec. After the first run, I did see a cache file created. It had filenames and I believe it is a timestamp. Any suggestion?

Thanks again!


From: Oliver Burn <[hidden email]>
To: [hidden email]
Sent: Thu, July 14, 2011 8:24:22 PM
Subject: Re: [Checkstyle-user] Caching checkstyle results; running only broken tests

Hi,

I would recommend that you look into the cacheFile property on the TreeWalker module, as described at http://checkstyle.sourceforge.net/config.html.

Is this not what you are looking for?

Regards,
Oliver

On Fri, Jul 15, 2011 at 13:07, Mirza Abbas Raza <[hidden email]> wrote:
Hi,

My apologies if this has already been addressed. I had a hard time searching it on the mailing list. Nothing novel about this - anybody using checkstyle with a non-trivial application must have seen this. 

So, checkstyle takes almost 5 minutes to run, partly because we have lots of suppressions. I want to minimize the time by letting checkstyle cache the results and run only the broken tests on the subsequent runs. Turns out, no solution is available out of the box at least based on my google search. One solution that I found online is this http://lifeisbetter.in/blog/2010/10/26/checkstyle-ant-task-run-checkstyle-only-on-modified-files/ . The issue with this solution is that if a broken test is not fixed, that test will not run again because the file was not modified. I am thinking of having a timestamp based solution. However, it there is a out of the box solution, that would be the best deal. Any pointers on existing solutions would help too. Any help appreciated.

Thanks,
Abbas


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user



------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
Reply | Threaded
Open this post in threaded view
|

Turning off certain Checkstyle options

Michael Feher
In reply to this post by Oliver Burn
Greetings,

I'm a new user of the SQE suite (including Checkstyle) in NetBeans 6.9.1 for a work project and had a question even after RTFMing:

1. How can I change the behavior of something specific such as "braces should start on previous line"?  I can't figure out from the Wiki where I need to change that one (i.e. what category does that issue fall under?  where's the XML file located to change the option?  what's the new value I need to set?)  I ask this because our project has decided (in its infinite wisdom) to follow a violates-Checkstyle-rules-by-default coding standard.

(UPDATE: Since I started using this toolset recently, I've come across a few more rules I want to turn off, because I think they are just preferential and don't interfere with the writing of valid Java code.)

Thanks in advance,
Mike Feher


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Checkstyle-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user