Skip to main content
Participating Frequently
December 4, 2009
Question

Great tool, some feature requests...

  • December 4, 2009
  • 3 replies
  • 1348 views

Hi

Great tool Xavier - should take the more tedious stuff out of code reviews.

A couple of suggestions:

It would be good if you could specify a number of different source paths to run over in the ant task. We have several projects, some with several sourece paths. Instead of having an xml file produced for each one and having to load them one by one into the viewer it would be nice to be able to run the task once and generate 1 xml file.

For flex CPD could we specify the output file? I realise that you might be hardcoding the filename for the CPD tool so understand if this isn't goign to happen.

It would be useful if the viewer could load in multiple files at the same time

How do we make the ant build fail if PMD finds problems?

For Flex CPD it would be helpful if we could tell it to ignore certain lines - for example imort lines.

I tried to have a look and see if I could fix some of these issues but couldn't get any of the projects to build. The flex projects are looking for a libs directory that isn't in the source control and I couldn't be bothered finding and downlaoding them all

This topic has been closed for replies.

3 replies

Adobe Employee
April 14, 2010

Gilles,

We implemented a way to un-delete a rule in your custom ruleset:

https://bugs.adobe.com/jira/browse/FLEXPMD-111

http://opensource.adobe.com/svn/opensource/flexpmd/bin/flex-pmd-ruleset-creator-1.2-SNAPSHOT.html

Just import your custom ruleset, and you will see new buttons appearing.

Cheers,

Xavier

Participant
February 22, 2010

Hi,

I second Gilles' suggestion : it would be really useful to be able to use a file set to specify FlexPMD ant task's input. Is there any plan to do it ? Beyond that great tool indeed, it's been extremely useful to us.

Adobe Employee
December 4, 2009

Thanks for the feedback

It would be good if you could specify a number of different source paths to run over in the ant task. We have several projects, some with several sourece paths. Instead of having an xml file produced for each one and having to load them one by one into the viewer it would be nice to be able to run the task once and generate 1 xml file.

For Ant, you could specify several filesets, couldn't you? I must admit that I don't use Ant a lot.

For flex CPD could we specify the output file? I realise that you might be hardcoding the filename for the CPD tool so understand if this isn't goign to happen.

We could, but can you explain your case? I don't see any obvious reasons to do that. That would be great if you shed a light.

It would be useful if the viewer could load in multiple files at the same time

There will be other ways to see violations.

How do we make the ant build fail if PMD finds problems?    

failOnError="true" in yiur build.xml

For Flex CPD it would be helpful if we could tell it to ignore certain lines - for example imort lines.    

In the next release, the imports and comments are ignored.

I don't see any simple ways to specify which lines to ignore.

I tried to have a look and see if I could fix some of these issues but couldn't get any of the projects to build. The flex projects are looking for a libs directory that isn't in the source control and I couldn't be bothered finding and downlaoding them all

Some of the librairies are not opensource, but there is on the wiki a HOW-TO build the project yourself.

I hope this helps

Thanks

Xavier

RoadersAuthor
Participating Frequently
December 4, 2009


It would be good if you could specify a number of different source paths to run over in the ant task. We have several projects, some with several sourece paths. Instead of having an xml file produced for each one and having to load them one by one into the viewer it would be nice to be able to run the task once and generate 1 xml file.

For Ant, you could specify several filesets, couldn't you? I must admit that I don't use Ant a lot.

Not for PMD - you can for CPD. If we coudl do the same in PMD it would be good.

For flex CPD could we specify the output file? I realise that you might be hardcoding the filename for the CPD tool so understand if this isn't goign to happen.

We could, but can you explain your case? I don't see any obvious reasons to do that. That would be great if you shed a light.

Sorry, this should be for PMD not CPD. As I am running it once for every source path I have to use different folders for the result as it always produces a file with the same name. It would be nicer if I could put all the generated files in the same folder with different file names.

Thanks for your help on the other issues. Ignoring imports is all I want for CPD - no requirement to ignore specific lines.

Lookign forward to the next release - and for the eclipse plugin (unless you want some early beta testing from an old colleague )

RoadersAuthor
Participating Frequently
December 7, 2009

Couple more:

The ruleset creator really needs an import button as well as an export button so you can edit rulesets that you've already created.

The Swtich statement rule: "Switch statements should have a default case" should pass if there is an empty default case specified (IMHO).