Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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 )
Copy link to clipboard
Copied
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).
Copy link to clipboard
Copied
Hi,
The import ruleset could be easily done.
About the default case in the switch statement, I disagree with you:
The default case should be used to handle unexpected case. So having it empty is as "bad" as not having it.
You can still ignore the violation by appending // NO PMD Default
Xavier
Copy link to clipboard
Copied
We've got a number of classes with switch statements where we do not want to handle very case. For example when we are overriding styleChanged we are only interested in some of the styles being changed.
Anyway, doesn't matter - I don't have very strong views either way. The // NO PMD Default is interesting - does that ignore the whole function or how does this work. What does default mean?
Can you give us a bit more information on that?
Thanks
Copy link to clipboard
Copied
the // NO PMD Default
means:
"FlexPMD, I know what I am doing. Please ignore any violations containing Default in its name on this line"
If you have // NO PMD
"FlexPMD, I know what I am doing. Please ignore any violations on this line"
HTH
Xavier
Copy link to clipboard
Copied
Thanks, that's great to know - I can now turn back on a few rules that I turned off. Speaking of which, I don't think that there is a way to un-delete a deleted rule is there - I have added a feature request for that.
Espen says stop chatting and get back to work any idea when the import ruleset feature will be added and uploaded?
Thanks for the help
Copy link to clipboard
Copied
The import feature will be part of the next release which is days away.
Sau Hi to Espen
Xavier
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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