Skip to main content
Known Participant
December 13, 2009
Question

my best workflow so far.

  • December 13, 2009
  • 1 reply
  • 1142 views

Thought I'd share a way Ive found to work with PMD and the eclipse plug-in when adding the nature to a project which already has quite a lot of code.

1. add the pmd nature

2. turn on Monitorize

First i tried just doing a clean build hoping all the code would be tested. it either didnt work or I think just stopped cus of too many files

anyway, what ive now done to good effect is this.

Go through each folder, or master package and do a manual PMD run (this also then displays the results in the flexPMD view panel, which wasnt happening when pmd was auto run by a build)

once Ive gone through each folder and done a manual run, the errors etc in the problems panel just agregate nicely. Now I have a fully tested start point

from then on only files I change and save are tested, during the build cycle, and all seems to be running very well.

It helps a great deal if you set up a second problems panel just for pmd results.

It's taken me a while to find this (although obvious) workflow, but now for the first time I have a fully tested code base that only retests changed files.

and thanks for the 2500 problems lol

I've found working this way to have the best results so far.

builder 4

sdk4 trunk

pmd trunk

glenn

ps - typos - i've only been awake 30 minutes and still on first espresso!

This topic has been closed for replies.

1 reply

December 13, 2009

Hi Glenn,

Adding the nature to your project should be enough so that FlexPMD runs automatically on all your source files and see the errors in the errors panel. It shouldn't be necessary for you to run FlexPMD "manually". You might be experiencing an error related to http://forums.adobe.com/thread/537410

I'll try to reproduce and fix the issue. It seems to be affecting several people.


once Ive gone through each folder and done a manual run, the errors etc in the problems panel just agregate nicely. Now I have a fully tested start point

Why do you go through each folder? Running FlexPMD in a parent folder should recursively scan all subfolders. Is it not the case for you?

Go through each folder, or master package and do a manual PMD run (this also then displays the results in the flexPMD view panel, which wasnt happening when pmd was auto run by a build)

When you add flexPMD nature to your projects it's not expected to see the problems in the FlexPMD View, you will only see the problmes in the problems View. FlexPMD View only displays the errors when FlexPMD is executed as an action.

Known Participant
December 13, 2009

hi

when i say go through each folder, that wasnt quite correct. what i actually do is break the code up into chunks, clicking on top level. when i try to do whole code is doesnt work for me. I have to select a folder (with sub folders) that only have so many files. im not sure of how many but too many seems to not work.

Ive never been able to run pmd on my whole src directory (plug in or command line) it crashes with the error i posted earlier (the java index error one)

thats the only reason i  go through manually. as long as i dont feed it too many files at one time all is well

December 13, 2009

Hi Glenn,

let's then focus on fixing this :-)

We're using FlexPMD internally in quite big projects with several thousands of classes and we don't apparently have performance problems. Could you please post again the error you're getting so that we can investigate?

Cheers

Xavi