GithubHelp home page GithubHelp logo

jamesmgreene / grunt-flexpmd Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 5.0 175 KB

A Grunt task plugin for running FlexPMD to lint/analyze apps built on Adobe Flex/ActionScript/MXML/Flash/AIR/etc. Think of it as "ASLint"/"FlexLint".

License: MIT License

JavaScript 100.00%

grunt-flexpmd's Introduction

Hello! I'm James. ๐Ÿ‘‹

I am a "seasoned" software engineer, currently working for GitHub on Actions, Pages, deployments, and more. :octocat:

About me

  • Pronouns: he/him
  • Husband to my wife. ๐Ÿคตโ€โ™‚๏ธ ๐Ÿ‘ฐโ€โ™€๏ธ
  • Father to my daughter. ๐Ÿง’
  • Servant to my cats. ๐Ÿฑ ๐Ÿˆ
  • Ally. ๐Ÿณ๏ธโ€๐ŸŒˆ ๐Ÿณ๏ธโ€โšง๏ธ ๐Ÿ–ค ๐ŸคŽ โค๏ธ ๐Ÿงก ๐Ÿ’› ๐Ÿ’š ๐Ÿ’™ ๐Ÿ’œ ๐Ÿค
  • Open source enthusiast. ๐Ÿ’
  • Lifelong learner. ๐Ÿ“š
  • Scuba diver, traveler, nature enthusiast, hiker, camper, explorer. ๐Ÿฅพ
  • Handy but willing to admit my limits. ๐Ÿ› ๏ธ

grunt-flexpmd's People

Contributors

isbatak avatar jamesmgreene avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grunt-flexpmd's Issues

Fatal error: ENOENT

Hi,
I'm getting this error "Fatal error: Unable to read "pmd.xml" file (Error code: ENOENT)." because I'm using grunt v0.4.5 and in files.js method signature is file.copy = function(srcpath, destpath, options) but in flexpmd.js you are passing grunt.file.copy(dest, outputFile);.
In other words dest and outputFile have to be swapped like this grunt.file.copy(outputFile,dest).

Reporting is intermittently flaky

Sometimes when running FlexPMD over multiple files, I don't receive any violations. However, if a single violation is added, I receive other unrelated violations that existed before but didn't show up.

I suspect that perhaps they are "warnings" vs. "errors"/"violations" or something like that, so the code that does handles consuming the report may need to be updated to consider more conditions in the XML.

If that's not the case, then perhaps FlexPMD is just unreliable and needs to be run on a single file instead of against a whole directory, i.e. so make a temporary dir for each file and run flexpmd against each one individually internally.

putting together a custom flexpmd ruleset.xml

the current documentation for flexpmd in general is abysmal. Adobe has completely washed their hands of it and has put everything on sourceforge. Just in case someone is coming after me on a similar effort and have found the same set of 4 nearly unproductive links, then perhaps this might help.

<?xml version="1.0"?>
<ruleset name="custom ruleset"
         xmlns="http://pmd.sf.net/ruleset/1.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
         xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>custom ruleset for flexpmd</description>

<!-- provide exclusions -->
<exclude-pattern>.*/com/whatever/.*</exclude-pattern>

<!-- ruleset definitions ripped from http://www.java2s.com/Code/Jar/f/Downloadflexpmdrulesetjar.htm -->
<rule ref="com/adobe/ac/pmd/rulesets/component.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/architecture.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/basic_mxml.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/binding.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/cairngorm.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/component.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/css.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/empty.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/event.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/maintanability.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/naming.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/performance.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/sizing.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/style.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/switches.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/unittest.xml" />
<rule ref="com/adobe/ac/pmd/rulesets/unused.xml" />

</ruleset>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.