You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Christofer Dutz <ch...@c-ware.de> on 2015/03/06 10:01:24 UTC

[FlexPMD] Starting work on FlexPMD

Hi,


Summarizing the last state of FlexPMD in order to get others up to speed ...


As PMD didn't support adding new languages, Adobe seem to have forked PMD years ago in order to build FlexPMD with this. This base version of PMD hasn't been updated for a long, long time. While the standalone Ant target seems to be still working, the Maven plugin won't work with somewhat up-to-date maven versions. I invested quite some time to make them work, but I came to the conclusion that it's not possible within a reasonable effort.


As the current version of PMD supports language modules, I would like to extract the parts of FlexPMD that make up the Flex language support and convert this into a PMD language module and drop the old PMD code.


What do you think?


Chris

Re: [FlexPMD] Starting work on FlexPMD

Posted by Alex Harui <ah...@adobe.com>.
Have fun!

On 3/6/15, 1:01 AM, "Christofer Dutz" <ch...@c-ware.de> wrote:

>Hi,
>
>
>Summarizing the last state of FlexPMD in order to get others up to speed
>...
>
>
>As PMD didn't support adding new languages, Adobe seem to have forked PMD
>years ago in order to build FlexPMD with this. This base version of PMD
>hasn't been updated for a long, long time. While the standalone Ant
>target seems to be still working, the Maven plugin won't work with
>somewhat up-to-date maven versions. I invested quite some time to make
>them work, but I came to the conclusion that it's not possible within a
>reasonable effort.
>
>
>As the current version of PMD supports language modules, I would like to
>extract the parts of FlexPMD that make up the Flex language support and
>convert this into a PMD language module and drop the old PMD code.
>
>
>What do you think?
>
>
>Chris


AW: [FlexPMD] Starting work on FlexPMD

Posted by Christofer Dutz <ch...@c-ware.de>.
Ok ... so I finished migrating the rules to PMD5 and fixed the obvious errors in the Testsuite.
So currently the build is green ... would be cool however if someone could go through the rules and give them a little love. I don't know if I did the changes to the rules 100% PMD feng-shui ;-)

Next I'll invest a little time in actually bringing PMD itself, Parser and RuleSet together.

Chris

-----Ursprüngliche Nachricht-----
Von: Christofer Dutz [mailto:christofer.dutz@c-ware.de] 
Gesendet: Sonntag, 8. März 2015 11:35
An: dev@flex.apache.org
Betreff: AW: [FlexPMD] Starting work on FlexPMD

Hi Justin, 

just noticed ... you don't need FM at all to build my new version of Flex PMD. FlexMojos is only needed in order to build the editor and viewer of the old FlexPMD. All you need for the new language-module is what's inside the "language-module" directory. It should be self contained and have no reference any code outside this directory.

Chris


-----Ursprüngliche Nachricht-----
Von: Christofer Dutz [mailto:christofer.dutz@c-ware.de] 
Gesendet: Sonntag, 8. März 2015 11:28
An: dev@flex.apache.org
Betreff: AW: [FlexPMD] Starting work on FlexPMD

Oh ... thought I had FM 7.0.1 in there ... don't see a reason not using the latest released version ;-)

Yesterday I noticed that I had to comment out some code in order to have FlexPMD use PMD 5.x ... this made some of the tests in the ruleset testsuite fail ... I fixed most of these errors. Think I still need a few hours to sort these problems out (But it's the first warm and sunny day today here in germany, so I won't do this today ;-) ).

Actually if you switch to FM 7.0.1 it should work with a simple "mvn clean install" inside the language-modue directory.

Chris

-----Ursprüngliche Nachricht-----
Von: Justin Mclean [mailto:justinmclean@me.com] 
Gesendet: Sonntag, 8. März 2015 00:24
An: dev@flex.apache.org
Betreff: Re: [FlexPMD] Starting work on FlexPMD

Hi,

> Ok so I did a few changes and pushed my stuff. I didn't change the original but created a new project in a separate directory. All parser tests are green, in the rule set some are red. Didn't have the time to sort them our yet. So if you want to give it a try ... Feel free to do so ;-)

A minimal README might help :-) Obviously some set up issue (missing flexmojos) as I currently get this:

The project org.apache.flex.pmd:flexunit-theme:1.3-SNAPSHOT (/Users/justinmclean/Documents/ApacheFlexUtilitiesGit/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:7.1.0-SNAPSHOT or one of its dependencies could not be resolved: The following artifacts could not be resolved: net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT, net.flexmojos.oss:flexmojos-threadlocaltoolkit-wrapper:jar:7.1.0-SNAPSHOT, org.apache.flex:compiler:pom:4.13.0.20140701: Could not find artifact net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: swc @ line 29, column 13

Why does it need this?

Thanks,
Justin


AW: [FlexPMD] Starting work on FlexPMD

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Justin, 

just noticed ... you don't need FM at all to build my new version of Flex PMD. FlexMojos is only needed in order to build the editor and viewer of the old FlexPMD. All you need for the new language-module is what's inside the "language-module" directory. It should be self contained and have no reference any code outside this directory.

Chris


-----Ursprüngliche Nachricht-----
Von: Christofer Dutz [mailto:christofer.dutz@c-ware.de] 
Gesendet: Sonntag, 8. März 2015 11:28
An: dev@flex.apache.org
Betreff: AW: [FlexPMD] Starting work on FlexPMD

Oh ... thought I had FM 7.0.1 in there ... don't see a reason not using the latest released version ;-)

Yesterday I noticed that I had to comment out some code in order to have FlexPMD use PMD 5.x ... this made some of the tests in the ruleset testsuite fail ... I fixed most of these errors. Think I still need a few hours to sort these problems out (But it's the first warm and sunny day today here in germany, so I won't do this today ;-) ).

Actually if you switch to FM 7.0.1 it should work with a simple "mvn clean install" inside the language-modue directory.

Chris

-----Ursprüngliche Nachricht-----
Von: Justin Mclean [mailto:justinmclean@me.com] 
Gesendet: Sonntag, 8. März 2015 00:24
An: dev@flex.apache.org
Betreff: Re: [FlexPMD] Starting work on FlexPMD

Hi,

> Ok so I did a few changes and pushed my stuff. I didn't change the original but created a new project in a separate directory. All parser tests are green, in the rule set some are red. Didn't have the time to sort them our yet. So if you want to give it a try ... Feel free to do so ;-)

A minimal README might help :-) Obviously some set up issue (missing flexmojos) as I currently get this:

The project org.apache.flex.pmd:flexunit-theme:1.3-SNAPSHOT (/Users/justinmclean/Documents/ApacheFlexUtilitiesGit/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:7.1.0-SNAPSHOT or one of its dependencies could not be resolved: The following artifacts could not be resolved: net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT, net.flexmojos.oss:flexmojos-threadlocaltoolkit-wrapper:jar:7.1.0-SNAPSHOT, org.apache.flex:compiler:pom:4.13.0.20140701: Could not find artifact net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: swc @ line 29, column 13

Why does it need this?

Thanks,
Justin


AW: [FlexPMD] Starting work on FlexPMD

Posted by Christofer Dutz <ch...@c-ware.de>.
Oh ... thought I had FM 7.0.1 in there ... don't see a reason not using the latest released version ;-)

Yesterday I noticed that I had to comment out some code in order to have FlexPMD use PMD 5.x ... this made some of the tests in the ruleset testsuite fail ... I fixed most of these errors. Think I still need a few hours to sort these problems out (But it's the first warm and sunny day today here in germany, so I won't do this today ;-) ).

Actually if you switch to FM 7.0.1 it should work with a simple "mvn clean install" inside the language-modue directory.

Chris

-----Ursprüngliche Nachricht-----
Von: Justin Mclean [mailto:justinmclean@me.com] 
Gesendet: Sonntag, 8. März 2015 00:24
An: dev@flex.apache.org
Betreff: Re: [FlexPMD] Starting work on FlexPMD

Hi,

> Ok so I did a few changes and pushed my stuff. I didn't change the original but created a new project in a separate directory. All parser tests are green, in the rule set some are red. Didn't have the time to sort them our yet. So if you want to give it a try ... Feel free to do so ;-)

A minimal README might help :-) Obviously some set up issue (missing flexmojos) as I currently get this:

The project org.apache.flex.pmd:flexunit-theme:1.3-SNAPSHOT (/Users/justinmclean/Documents/ApacheFlexUtilitiesGit/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:7.1.0-SNAPSHOT or one of its dependencies could not be resolved: The following artifacts could not be resolved: net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT, net.flexmojos.oss:flexmojos-threadlocaltoolkit-wrapper:jar:7.1.0-SNAPSHOT, org.apache.flex:compiler:pom:4.13.0.20140701: Could not find artifact net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: swc @ line 29, column 13

Why does it need this?

Thanks,
Justin


Re: [FlexPMD] Starting work on FlexPMD

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

> Ok so I did a few changes and pushed my stuff. I didn't change the original but created a new project in a separate directory. All parser tests are green, in the rule set some are red. Didn't have the time to sort them our yet. So if you want to give it a try ... Feel free to do so ;-)

A minimal README might help :-) Obviously some set up issue (missing flexmojos) as I currently get this:

The project org.apache.flex.pmd:flexunit-theme:1.3-SNAPSHOT (/Users/justinmclean/Documents/ApacheFlexUtilitiesGit/FlexPMD/flex-pmd-flex/flexunit-theme/pom.xml) has 2 errors
[ERROR]     Unresolveable build extension: Plugin net.flexmojos.oss:flexmojos-maven-plugin:7.1.0-SNAPSHOT or one of its dependencies could not be resolved: The following artifacts could not be resolved: net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT, net.flexmojos.oss:flexmojos-threadlocaltoolkit-wrapper:jar:7.1.0-SNAPSHOT, org.apache.flex:compiler:pom:4.13.0.20140701: Could not find artifact net.flexmojos.oss:flexmojos-maven-plugin:jar:7.1.0-SNAPSHOT -> [Help 2]
[ERROR]     Unknown packaging: swc @ line 29, column 13

Why does it need this?

Thanks,
Justin


AW: [FlexPMD] Starting work on FlexPMD

Posted by Christofer Dutz <ch...@c-ware.de>.
Ok so I did a few changes and pushed my stuff. I didn't change the original but created a new project in a separate directory. All parser tests are green, in the rule set some are red. Didn't have the time to sort them our yet. So if you want to give it a try ... Feel free to do so ;-)

Chris

Gesendet mit meinem HTC

----- Reply message -----
Von: "Christofer Dutz" <ch...@c-ware.de>
An: "dev@flex.apache.org" <de...@flex.apache.org>
Betreff: [FlexPMD] Starting work on FlexPMD
Datum: Sa., Mär. 7, 2015 11:32

I already created a branch, but just haven't pushed it yet.
There are several things I have to do in parallell and I want to finish those raw changes before switching to "collaborative mode" as it would make things difficult now if more than one person was working on this.

As soon as I have the ruleset testsuite up and running, I'll push my changes ... then all that is left would be merging the api of our parser and the new "Parser" interface of PMD.

Chris


-----Ursprüngliche Nachricht-----
Von: Justin Mclean [mailto:justin@classsoftware.com]
Gesendet: Samstag, 7. März 2015 04:48
An: dev@flex.apache.org
Betreff: Re: [FlexPMD] Starting work on FlexPMD

Hi,

> Today I migrated the parser and the rule set part and a fist version (codename "MadeByMyGuyver") seems tob e runnning. Now I need to do a lot of cleaning up.

Any chance you could branch and check in as you go rather than just at the end? That way people can review and help out.

PMD already supports Javascript sp could we also repurpose some of those rules for ActionScript code? [1] Or perhaps we can add to the Javascript ruleset as their ruleset seems a little on the minimal side.

Thanks,
Justin

1. http://pmd.sourceforge.net/pmd-5.2.3/pmd-javascript/rules/index.html


AW: [FlexPMD] Starting work on FlexPMD

Posted by Christofer Dutz <ch...@c-ware.de>.
I already created a branch, but just haven't pushed it yet.
There are several things I have to do in parallell and I want to finish those raw changes before switching to "collaborative mode" as it would make things difficult now if more than one person was working on this. 

As soon as I have the ruleset testsuite up and running, I'll push my changes ... then all that is left would be merging the api of our parser and the new "Parser" interface of PMD.

Chris


-----Ursprüngliche Nachricht-----
Von: Justin Mclean [mailto:justin@classsoftware.com] 
Gesendet: Samstag, 7. März 2015 04:48
An: dev@flex.apache.org
Betreff: Re: [FlexPMD] Starting work on FlexPMD

Hi,

> Today I migrated the parser and the rule set part and a fist version (codename "MadeByMyGuyver") seems tob e runnning. Now I need to do a lot of cleaning up.

Any chance you could branch and check in as you go rather than just at the end? That way people can review and help out.

PMD already supports Javascript sp could we also repurpose some of those rules for ActionScript code? [1] Or perhaps we can add to the Javascript ruleset as their ruleset seems a little on the minimal side.

Thanks,
Justin

1. http://pmd.sourceforge.net/pmd-5.2.3/pmd-javascript/rules/index.html


Re: [FlexPMD] Starting work on FlexPMD

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

> Today I migrated the parser and the rule set part and a fist version (codename "MadeByMyGuyver") seems tob e runnning. Now I need to do a lot of cleaning up.

Any chance you could branch and check in as you go rather than just at the end? That way people can review and help out.

PMD already supports Javascript sp could we also repurpose some of those rules for ActionScript code? [1] Or perhaps we can add to the Javascript ruleset as their ruleset seems a little on the minimal side.

Thanks,
Justin

1. http://pmd.sourceforge.net/pmd-5.2.3/pmd-javascript/rules/index.html


AW: [FlexPMD] Starting work on FlexPMD

Posted by Christofer Dutz <ch...@c-ware.de>.
Well actually I think it's not that difficult.

Today I migrated the parser and the rule set part and a fist version (codename "MadeByMyGuyver") seems tob e runnning. Now I need to do a lot of cleaning up.
The original testsuite was a mess of JUnit 3 and JUnit 4 ... so I started cleaning that up too
Now the parser tests are entirely run by TestNG and I'm going to start work on the rule-set testsuite next.

Guess it shouldn't be too much work and I'll probably finish this in the next one or two weeks on my own ... as soon as that's through I'd be happy for some testers ;-)

Things I have on my list is to exchange the hand coded parser with one using the Falcon parser part. But I'll be happy to have the first PMD Language Module live even without this.

Chris

-----Ursprüngliche Nachricht-----
Von: Justin Mclean [mailto:justin@classsoftware.com] 
Gesendet: Freitag, 6. März 2015 22:13
An: dev@flex.apache.org
Betreff: Re: [FlexPMD] Starting work on FlexPMD

Hi,

> As the current version of PMD supports language modules, I would like to extract the parts of FlexPMD that make up the Flex language support and convert this into a PMD language module and drop the old PMD code.

Do you have any idea of how much effort it going to be to convert the old rule set into the new format. Is it reasonable straight forward? How can other people help out?

Thanks,
Justin

Re: [FlexPMD] Starting work on FlexPMD

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

> As the current version of PMD supports language modules, I would like to extract the parts of FlexPMD that make up the Flex language support and convert this into a PMD language module and drop the old PMD code.

Do you have any idea of how much effort it going to be to convert the old rule set into the new format. Is it reasonable straight forward? How can other people help out?

Thanks,
Justin