You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Mathieu St-Gelais <ma...@gmail.com> on 2013/06/04 17:47:26 UTC

Code analysis tool

Hello.

I've been working with FlexPMD and Flex 4.6 recently, but the project seems
to be dead. Also, I'm moving to Flex 4.9, and take it as an opportunity to
"upgrade" my practices and tools.

Anybody knows what are the plans with the FlexPMD project, if there are
any? If not, are there any other tools that are recommended?

Thanks!

Matt

Re: Code analysis tool

Posted by Mathieu St-Gelais <ma...@gmail.com>.
Hi people. I found a project on GitHub by Peter Heoche. He has fixed
various issues with Adobe's FlexPMD, added new rules, etc. You can download
his jars from here: https://github.com/PeterHoeche/adobe-flex-pmd/downloads

I use the tool in command line, and it works great.

Matt


On Tue, Jun 4, 2013 at 12:48 PM, Mathieu St-Gelais <
mathieu.stgelais@gmail.com> wrote:

> Thanks Justin. I'm having problems with some of my MXML files. Analysing
> AS files works flawlessly though.
>
> I'm currently trying to compile FlexPMD and see if I can fix the problem,
> or at least bypass it.
>
> If anyone's interested, I get the following stack trace :
>
> Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1,
> Size: 1
> at java.util.ArrayList.rangeCheck(ArrayList.java:571)
>  at java.util.ArrayList.set(ArrayList.java:364)
> at
> com.adobe.ac.pmd.files.impl.MxmlFile.copyScriptLinesKeepingOriginalLineIndices(MxmlFile.java:193)
>  at
> com.adobe.ac.pmd.files.impl.MxmlFile.extractScriptBlock(MxmlFile.java:269)
> at com.adobe.ac.pmd.files.impl.MxmlFile.<init>(MxmlFile.java:63)
>  at com.adobe.ac.pmd.files.impl.FileUtils.create(FileUtils.java:103)
> at
> com.adobe.ac.pmd.files.impl.FileUtils.computeFilesList(FileUtils.java:72)
>  at
> com.adobe.ac.pmd.FlexPmdViolations.computeFiles(FlexPmdViolations.java:138)
> at
> com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:98)
>  at
> com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.java:161)
> at
> com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:138)
>  at com.adobe.ac.pmd.commandline.FlexPMD.startFlexPMD(FlexPMD.java:119)
> at com.adobe.ac.pmd.commandline.FlexPMD.main(FlexPMD.java:70)
>
> Matt
>
>
> On Tue, Jun 4, 2013 at 12:16 PM, Justin Mclean <ju...@classsoftware.com>wrote:
>
>> Hi,
>>
>> Even if no-one is work on FlexPMD it's still can be a very useful tool.
>> I've used with with Apache Flex 4.9 projects so there's no compatibility
>> issues.
>>
>> Thanks,
>> Justin
>
>
>

Re: Code analysis tool

Posted by Mathieu St-Gelais <ma...@gmail.com>.
Thanks Justin. I'm having problems with some of my MXML files. Analysing AS
files works flawlessly though.

I'm currently trying to compile FlexPMD and see if I can fix the problem,
or at least bypass it.

If anyone's interested, I get the following stack trace :

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1,
Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:571)
at java.util.ArrayList.set(ArrayList.java:364)
at
com.adobe.ac.pmd.files.impl.MxmlFile.copyScriptLinesKeepingOriginalLineIndices(MxmlFile.java:193)
at
com.adobe.ac.pmd.files.impl.MxmlFile.extractScriptBlock(MxmlFile.java:269)
at com.adobe.ac.pmd.files.impl.MxmlFile.<init>(MxmlFile.java:63)
at com.adobe.ac.pmd.files.impl.FileUtils.create(FileUtils.java:103)
at com.adobe.ac.pmd.files.impl.FileUtils.computeFilesList(FileUtils.java:72)
at
com.adobe.ac.pmd.FlexPmdViolations.computeFiles(FlexPmdViolations.java:138)
at
com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:98)
at
com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.java:161)
at
com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:138)
at com.adobe.ac.pmd.commandline.FlexPMD.startFlexPMD(FlexPMD.java:119)
at com.adobe.ac.pmd.commandline.FlexPMD.main(FlexPMD.java:70)

Matt


On Tue, Jun 4, 2013 at 12:16 PM, Justin Mclean <ju...@classsoftware.com>wrote:

> Hi,
>
> Even if no-one is work on FlexPMD it's still can be a very useful tool.
> I've used with with Apache Flex 4.9 projects so there's no compatibility
> issues.
>
> Thanks,
> Justin

Re: Code analysis tool

Posted by Justin Mclean <ju...@classsoftware.com>.
Hi,

Even if no-one is work on FlexPMD it's still can be a very useful tool. I've used with with Apache Flex 4.9 projects so there's no compatibility issues.

Thanks,
Justin