flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [11/46] FlexPMD Donation from Adobe Systems Inc
Date Fri, 25 Apr 2014 06:18:10 GMT
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml
new file mode 100644
index 0000000..02172a7
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/security.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<ruleset name="Security Rules" 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>
+      The Security AS3 Ruleset contains a collection of best practices related to secure code.
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.security.InsecureExactSettingsRule"
+		message="Security.exactSettings is set to an insecure value">
+		<description>The security.exactSettings value should remain set at the default true value. Setting this value to false could make the SWF vulnerable to cross-domain attacks.</description>
+		<priority>1</priority>
+		<example>
+			//exactSettings should be left as the default
+   			Security.exactSettings = true;
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.AllowAllSecureDomainRule"
+		message="Security.allowDomain is set to an insecure value">
+		<description>The security.allowDomain value of "*" will allow any domain to cross-script into the domain of this SWF and exercise its functionality.</description>
+		<priority>1</priority>
+		<example>
+			//The allowDomain settings should be specific
+   			Security.allowDomain("www.example.org");
+      	</example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.security.LocalConnectionStarRule"
+		message="LocalConnection.allowDomain is set to an insecure value">
+		<description>The LocalConnection.allowDomain value of "*" will allow any domain to connect to this SWF and call its functions.</description>
+		<priority>1</priority>
+		<example>
+			//The allowDomain setting should be specific
+   			LocalConnection.allowDomain("www.example.org");
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.AllowInsecureDomainRule"
+		message="Potentially unnecessary use of allowInsecureDomain">
+		<description>Using allowInsecureDomain will allow untrusted content from an HTTP site to inject data into a trusted HTTPS connection which may comprimise the integrity of the HTTPS connection. The use of allowDomain is preferred.</description>
+		<priority>1</priority>
+		<example>
+			//Use the allowDomain setting instead
+   			LocalConnection.allowDomain("www.example.org");
+			Security.allowDomain("www.example.org");
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.LSOSecureFalseRule"
+		message="The secure flag is set to false">
+		<description>If this SWF is being served over HTTPS then the secure flag should be set to true. This can help prevent sensitive SSL protected information from being shared within insecure HTTP content. If this SWF is served over HTTP then you can ignore this warning.</description>
+		<priority>5</priority>
+		<example>
+			//Setting secure values for LSOs
+   			LSO.getLocal(name, null, true);
+      	</example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.security.ImportLoadBestPracticeRule"
+		message="Set allowCodeImport to false when import loading images">
+		<description>If this loader is only intended to load image files (GIF,JPG,PNG) then be sure to set the allowCodeImport value to false. Setting this flag will reduce the chances of an untrusted SWF gaining access to your site. If your intent is to load a SWF, the URL for the request is a static value for a trusted site and/or you have already set the allowCodeImport flag, then you can ignore this warning.</description>
+		<priority>5</priority>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml
new file mode 100644
index 0000000..78337d1
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/sizing.xml
@@ -0,0 +1,178 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<ruleset name="Sizing Rules" 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>
+      The Sizing As3 Ruleset contains a collection of good practices related to code sizing.
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyFunctionRule"
+		message="Too many methods detected ({0} maximum, but {1} actually)">
+		<description>A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+      // [... more more public methods ...]
+   }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooLongFunctionRule"
+		message="This function is far too long ({0} maximum, but {1} actually)">
+		<description>Violations of this rule usually indicate that the method has too much responsibility. Try to reduce the method size by creating helper methods and removing any copy/pasted code.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>20</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public function doSomething() : void
+      {
+         System.out.println("Hello world!");
+         System.out.println("Hello world!");
+         // 98 copies omitted for brevity.
+      }
+   }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooLongSwitchCaseRule"
+		message="Long switch case detected ({0} lines maximum, but {1} actually)">
+		<description>A switch case statement should be either empty, or contain a break, or call another method.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>3</value>
+			</property>
+		</properties>
+		<example>
+   public class Bar   
+   {
+      public function foo() : void
+      {
+          var i : int = 4;
+          
+          switch( i )
+          {
+             case 1:
+                handleFirstCase();
+                break;
+             case 2: // VIOLATION
+                googleResquest.url = "";
+                handleSecondCaseFirstPart();
+                handleSecondCaseSecondPart();
+                break;
+          }
+      }
+   }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyParametersRule"
+		message="Long parameter list detected ({0} maximum, but {1} actually)">
+		<description>Long parameter lists can indicate that a new object should be created to wrap the numerous parameters.  Basically, try to group the parameters together.
+      </description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>4</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public function addData( p0 : int, p1 : int, p2 : int, p3 : int, p4 : int, p5 : int,
+                                             p6 : int, p7 : int, p8 : int, p9 : int, p10 : int ) : void 
+      {
+      }
+   }
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyPublicRule"
+		message="Too many public fields or functions detected ({0} maximum, but {1} actually)">
+		<description>A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>10</value>
+			</property>
+		</properties>
+		<example>
+   public class Foo 
+   {
+      public var value : String;
+      public var something : Bar;
+      public var variable : Variable;
+
+      // [... more more public attributes ...]
+
+      public function doWork() : void {}
+      public function doMoreWork() : void {}
+      public function doWorkAgain() : void {}
+
+      // [... more more public methods ...]
+   }
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyFieldsRule"
+		message="Too many field detected ({0} maximum, but {1} actually)">
+		<description>Classes that have too many fields could be redesigned to have fewer fields, possibly  through some nested object grouping of some of the information.  For example, a class with  city/state/zipcode fields could instead have one Address field.</description>
+		<priority>3</priority>
+		<properties>
+			<property name="maximum">
+				<value>5</value>
+			</property>
+		</properties>
+		<example>
+   public class Person 
+   {
+      private var one : String;
+      private var two : int;
+      private var three : int;
+
+      [... many more public fields ...]
+
+   }      
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.sizing.TooManyFieldInVORule"
+		message="Too many field detected ({0} maximum, but {1} actually)">
+		<priority>3</priority>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml
new file mode 100644
index 0000000..776bc04
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/style.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<ruleset name="Style Rules" 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>
+      The Architecture ruleset contains a collection of good practices around architecture.
+	</description>
+
+	<rule class="com.adobe.ac.pmd.rules.style.ConstructorNonEmptyReturnTypeRule"
+		message="A constructor should not have a return type">
+		<description>Even if this is syntactically correct, there should not be a return type for a constructor.</description>
+		<priority>5</priority>
+		<example>
+   public class VoidConstructor   
+   {
+      public function VoidConstructor() : void // VIOLATION
+      {         
+      }      
+   }
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.style.OverLongLineRule"
+		message="Too long line ({0} maximum, but {1} actually)">
+		<description></description>
+		<priority>5</priority>
+		<properties>
+			<property name="maximum">
+				<value>200</value>
+			</property>
+		</properties>
+		<example>
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.style.ImportFromSamePackageRule"
+		message="Imports from the same package are not necessary">
+		<description></description>
+		<priority>5</priority>
+		<example>
+package com.adobe.ac
+{
+   import com.adobe.ac.MyModel; // VIOLATION HERE
+
+   public class BigModel   
+   {
+      public var model : MyModel = null;
+   }
+}         
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.style.CopyrightMissingRule"
+		message="The copyright header is missing in this file">
+		<priority>5</priority>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.style.BadFormatLoggerRule"
+		message="The logger is not correctly formatted because {0}">
+		<description></description>
+		<priority>5</priority>
+		<example>
+      </example>
+	</rule>
+		
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml
new file mode 100644
index 0000000..64d969c
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/switches.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<ruleset name="Switches Rules" 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>
+      The Architecture ruleset contains a collection of good practices around architecture.
+	</description>
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.switchrules.SwitchStatementsShouldHaveDefaultRule"
+		message="A switch statement does not contain a default statement">
+		<description>Switch statements should have a default label in order to detect corner cases.</description>
+		<priority>1</priority>
+		<example>
+public class Foo 
+{
+   public funciton bar() : void 
+   {
+      var  x : int = 2;
+      switch (x) 
+      {
+         case 2: var j : int = 8;
+      }
+   }
+}     
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.switchrules.NestedSwitchRule"
+		message="Switch must not be nested">
+		<description>As a general practice, switch statement should not be used. Prefer using inheritance. It is even harder to read when switch statements are nested.</description>
+		<priority>3</priority>
+		<example>
+public function foo( a : Number, b : Number ) : void
+{
+    switch( a )
+    {
+       case 1:
+          break;
+       case 2:                   
+          switch ( b ) 
+          {
+            case 3 :
+               break;
+            case 4 :
+               break;
+          }
+          break;                     
+    }
+}
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.switchrules.NonBreakableSwitchCaseRule"
+		message="Switch case must include break statement">
+		<priority>1</priority>
+		<example>
+switch(event.type){
+  case GoogleSearchPanel.LAUNCH_GOOGLE_WEB_SEARCH:
+	  googleResquest.url = ""; // VIOLATION
+  case GoogleSearchPanel.LAUNCH_GOOGLE_IMAGE_SEARCH:                   
+  case GoogleSearchPanel.LAUNCH_GOOGLE_IMAGE_SEARCH2:                   
+	  googleResquest.url = "";
+	  break;
+  default:
+	  return;
+}
+      </example>
+	</rule>
+
+	
+	<rule
+		class="com.adobe.ac.pmd.rules.switchrules.TooFewBrancheInSwitchStatementRule"
+		message="There are too few branches in this switch statement ({0} minimum, but {1} actual)">
+		<description>Switch statements are designed for complex branches, and allow branches to share treatment. Using a switch for only 2 branches is ill advised, as switches are not as easy to understand as if. In this case, it's most likely is a good idea to use a if statement</description>
+		<priority>5</priority>
+		<properties>
+			<property name="minimum">
+				<value>3</value>
+			</property>
+		</properties>
+		<example>
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.switchrules.IdenticalSwitchCasesRule"
+		message="Two switch cases should not be identical">
+		<priority>1</priority>
+	</rule>
+		
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml
new file mode 100644
index 0000000..0cb6808
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unittest.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<ruleset name="FlexUnit Rules" 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>
+      The FlexUnit Ruleset contains a collection of good practices related to FlexUnit (1 and 4).
+    </description>
+    
+	<rule class="com.adobe.ac.pmd.rules.flexunit.EmptyUnitTest"
+		message="A test should contain at least one assertion">
+		<priority>3</priority>
+	</rule>
+	
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml
new file mode 100644
index 0000000..35ed526
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/main/resources/com/adobe/ac/pmd/rulesets/unused.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+<ruleset name="Unused Rules" 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>
+      The Architecture ruleset contains a collection of good practices around architecture.
+	</description>
+	
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedParameterRule"
+		message="This parameter ({0}) of this function is not used">
+		<description>
+      </description>
+		<priority>3</priority>
+		<example>
+      public function foo( param1 : Number, param2 : Number, param3 : Number, param4 : Number, param5 : Number ) : void // 4 violations
+      {
+         var i : int = param1;
+      }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedLocalVariableRule"
+		message="This variable ({0}) is not used">
+		<description>
+      </description>
+		<priority>3</priority>
+		<example>
+      public function foo() : void
+      {
+         var i : int = 0;// 1 violation
+      }
+      </example>
+	</rule>
+	
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedPrivateMethodRule"
+		message="This private method ({0}) does not seem to be used">
+		<description>
+      </description>
+		<priority>1</priority>
+		<example>
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.unused.UnusedFieldRule"
+		message="This private attribute ({0}) does not seem to be used">
+		<description>
+      </description>
+		<priority>1</priority>
+		<example>
+      </example>
+	</rule>
+
+	<rule class="com.adobe.ac.pmd.rules.unused.EmptyPrivateMethodRule"
+		message="This private method ({0}) is used but its content is empty">
+		<description>
+      </description>
+		<priority>1</priority>
+		<example>
+      </example>
+	</rule>
+		
+</ruleset>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRuleTest.java
new file mode 100644
index 0000000..cb73566
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/MonkeyPatchingRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.architecture;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class MonkeyPatchingRuleTest extends AbstractFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "mx.controls.DateChooser2.as", new ViolationPosition[]
+      { new ViolationPosition( 0 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MonkeyPatchingRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClassTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClassTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClassTest.java
new file mode 100644
index 0000000..1691f2f
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/UseInternalClassOutsideApiClassTest.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.architecture;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class UseInternalClassOutsideApiClassTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "functional.func2.restricted.Func2RestrictedClass.as", new ViolationPosition[]
+       { new ViolationPosition( 34 ) } ),
+                  new ExpectedViolation( "functional.func1.restricted.Func1RestrictedClass.as",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "functional.func2.api.Func2ExposedClass.as", new ViolationPosition[]
+                  { new ViolationPosition( 34 ) } ),
+                  new ExpectedViolation( "functional.func1.api.Func1ExposedClass.as", new ViolationPosition[]
+                  { new ViolationPosition( 36 ) } ),
+                  new ExpectedViolation( "functional.FunctionalClient.as", new ViolationPosition[]
+                  { new ViolationPosition( 34 ),
+                              new ViolationPosition( 36 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseInternalClassOutsideApiClass();
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRuleTest.java
new file mode 100644
index 0000000..1c6389d
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/architecture/ViewComponentReferencedInModelRuleTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.architecture;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ViewComponentReferencedInModelRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+      { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "import lala.view.MyObject;",
+                  "import MyObject   ",
+                  "   import lala.view.MyObject" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ViewComponentReferencedInModelRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "mport lala.view.MyObject",
+                  " text=\"{ vfrfr().frfr.frf.lala }\"/>",
+                  " text=\"{vfrfr().frfr.frf.lala}\"/>",
+                  "public dynamic class DynamicObject {",
+                  "dynamic public class DynamicObject" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRuleTest.java
new file mode 100644
index 0000000..818f546
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AbstractAsDocRuleTest.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.asdocs;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.logging.Logger;
+
+import net.sourceforge.pmd.PMDException;
+
+import com.adobe.ac.pmd.files.impl.FileUtils;
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+
+public abstract class AbstractAsDocRuleTest extends AbstractAstFlexRuleTest
+{
+   protected static final Logger LOGGER      = Logger.getLogger( AbstractAsDocRuleTest.class.getName() );
+   protected static final String TEST_FOLDER = "/asDocs";
+
+   public AbstractAsDocRuleTest()
+   {
+      super();
+
+      final URL resource = this.getClass().getResource( "/test"
+            + TEST_FOLDER );
+
+      if ( resource != null )
+      {
+         try
+         {
+            setTestFiles( FileUtils.computeFilesList( new File( resource.toURI().getPath() ),
+                                                      null,
+                                                      "",
+                                                      null ) );
+         }
+         catch ( final PMDException e )
+         {
+            LOGGER.warning( e.getLocalizedMessage() );
+         }
+         catch ( final URISyntaxException e )
+         {
+            LOGGER.warning( e.getLocalizedMessage() );
+         }
+      }
+   }
+
+   @Override
+   protected File getTestDirectory() // NO_UCD
+   {
+      return new File( super.getTestDirectory().getAbsolutePath()
+            + TEST_FOLDER );
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRuleTest.java
new file mode 100644
index 0000000..5360851
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/AttributeAsDocMissingRuleTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.asdocs;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class AttributeAsDocMissingRuleTest extends AbstractAsDocRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "EmptyClass.as", new ViolationPosition[]
+      { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new AttributeAsDocMissingRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRuleTest.java
new file mode 100644
index 0000000..d42e1f0
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/ClassAsDocMissingRuleTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.asdocs;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ClassAsDocMissingRuleTest extends AbstractAsDocRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "EmptyClass.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ClassAsDocMissingRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRuleTest.java
new file mode 100644
index 0000000..87c09aa
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/asdocs/MethodAsDocMissingRuleTest.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.asdocs;
+
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class MethodAsDocMissingRuleTest extends AbstractAsDocRuleTest
+{
+
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "EmptyClass.as", new ViolationPosition[]
+      { new ViolationPosition( 37 ),
+                  new ViolationPosition( 41 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new MethodAsDocMissingRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRuleTest.java
new file mode 100644
index 0000000..e2d18ff
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/BindingUtilsRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.binding;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class BindingUtilsRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.FatController.as", new ViolationPosition[]
+      { new ViolationPosition( 90 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BindingUtilsRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRuleTest.java
new file mode 100644
index 0000000..22cd7fc
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/ChangeWatcherRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.binding;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ChangeWatcherRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+      { new ViolationPosition( 35 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ChangeWatcherRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRuleTest.java
new file mode 100644
index 0000000..73d8214
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/binding/TooLongBindingExpressionRuleTest.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.binding;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class TooLongBindingExpressionRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList2.mxml", new ViolationPosition[]
+      { new ViolationPosition( 54 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { " text=\"{ vfrfr.frfr.frf.lala }\"/>",
+                  " text=\"{ vfrfr().frfr.frf.lala }\"/>",
+                  " text=\"{vfrfr().frfr.frf.lala}\"/>" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new TooLongBindingExpressionRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { " text=\"\"/>",
+                  "lala()",
+                  "<mx:Label text=\"{'a.b.c.d.e.f'}\" /> " };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRuleTest.java
new file mode 100644
index 0000000..82f2677
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BadCairngormEventNameFormatRuleTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.cairngorm;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class BadCairngormEventNameFormatRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      final ViolationPosition[] positions =
+      { new ViolationPosition( 38 ) };
+
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.events.UncorrectConstructorEvent.as", positions ),
+                  new ExpectedViolation( "cairngorm.events.UncorrectConstantEvent.as", positions ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BadCairngormEventNameFormatRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRuleTest.java
new file mode 100644
index 0000000..11f0379
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/BindableModelLocatorRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.cairngorm;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class BindableModelLocatorRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.BindableModelLocator.as", new ViolationPosition[]
+      { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new BindableModelLocatorRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.java
new file mode 100644
index 0000000..d6a1c0a
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/CairngormEventDispatcherCallExplicitlyRuleTest.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.cairngorm;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class CairngormEventDispatcherCallExplicitlyRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+      { new ViolationPosition( 110 ),
+                  new ViolationPosition( 114 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new CairngormEventDispatcherCallExplicitlyRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRuleTest.java
new file mode 100644
index 0000000..89276a2
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/FatControllerRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.cairngorm;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class FatControllerRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "cairngorm.FatController.as", new ViolationPosition[]
+      { new ViolationPosition( 95 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new FatControllerRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.java
new file mode 100644
index 0000000..59294b2
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ModelLocatorReferencedMoreThanOncePerClassRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.cairngorm;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ModelLocatorReferencedMoreThanOncePerClassRuleTest extends
+                                                               ReferenceModelLocatorOutsideTheMainApplicationRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "UnboundMetadata.as", new ViolationPosition[]
+      { new ViolationPosition( 50 ) } ) };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ModelLocatorReferencedMoreThanOncePerClassRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.java
new file mode 100644
index 0000000..7853bf7
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/cairngorm/ReferenceModelLocatorOutsideTheMainApplicationRuleTest.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.cairngorm;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ReferenceModelLocatorOutsideTheMainApplicationRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "UnboundMetadata.as", new ViolationPosition[]
+       { new ViolationPosition( 43 ),
+                   new ViolationPosition( 45 ),
+                   new ViolationPosition( 50 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.mxml.IterationsList.mxml",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 91 ),
+                                                     new ViolationPosition( 93 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "ModelLocator",
+                  "import com.my.MyModelLocator;" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new ReferenceModelLocatorOutsideTheMainApplicationRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "ModfrelLocator",
+                  "import com.my.MyModelLocafrtor;" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRuleTest.java
new file mode 100644
index 0000000..5d68156
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/CallLaterDirectlyRuleTest.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.component;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class CallLaterDirectlyRuleTest extends AbstractAstFlexRuleTest
+{
+
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "GenericType.as", new ViolationPosition[]
+      { new ViolationPosition( 41 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new CallLaterDirectlyRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.java
new file mode 100644
index 0000000..dc83f66
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/component/UpdateChildrenNumberInUpdateDisplayListRuleTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.component;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class UpdateChildrenNumberInUpdateDisplayListRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "BadComponent.as", new ViolationPosition[]
+      { new ViolationPosition( 42 ),
+                  new ViolationPosition( 43 ),
+                  new ViolationPosition( 44 ),
+                  new ViolationPosition( 45 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UpdateChildrenNumberInUpdateDisplayListRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRuleTest.java
new file mode 100644
index 0000000..998c631
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/StyleBlockInMxmlRuleTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.css;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class StyleBlockInMxmlRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Main.mxml", new ViolationPosition[]
+      { new ViolationPosition( 52 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "<mx:Style>",
+                  "  <mx:Style>   ",
+                  "<mx:Style>   ",
+                  "  <mx:Style>" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new StyleBlockInMxmlRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "<mx:VBox",
+                  "<Box",
+                  "<Canvas",
+                  "<VBox",
+                  "<mx:HBox",
+                  "<Accordion",
+                  "<Form",
+                  "<FormItem",
+                  "<LayoutContainer",
+                  "<Panel",
+                  "<ViewStack",
+                  "<mx:Style/>" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRuleTest.java
new file mode 100644
index 0000000..a3d9409
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/css/UseCssInsteadOfEmbedMetaDataRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.css;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class UseCssInsteadOfEmbedMetaDataRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "Title.as", new ViolationPosition[]
+      { new ViolationPosition( 38 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new UseCssInsteadOfEmbedMetaDataRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRuleTest.java
new file mode 100644
index 0000000..b20e210
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyCatchStatementRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.empty;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class EmptyCatchStatementRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.ConfigProxy.as", new ViolationPosition[]
+      { new ViolationPosition( 57 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EmptyCatchStatementRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRuleTest.java
new file mode 100644
index 0000000..fcd8900
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/empty/EmptyIfStmtRuleTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.empty;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class EmptyIfStmtRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "bug.Duane.mxml", new ViolationPosition[]
+       { new ViolationPosition( 91 ),
+                   new ViolationPosition( 87 ),
+                   new ViolationPosition( 83 ) } ),
+                  new ExpectedViolation( "PngEncoder.as", new ViolationPosition[]
+                  { new ViolationPosition( 578 ),
+                              new ViolationPosition( 584 ) } ),
+                  new ExpectedViolation( "RadonDataGrid.as", new ViolationPosition[]
+                  { new ViolationPosition( 63 ),
+                              new ViolationPosition( 190 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 106 ),
+                              new ViolationPosition( 113 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EmptyIfStmtRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRuleTest.java
new file mode 100644
index 0000000..e40d698
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/ConstructorDispatchingEventRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.event;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class ConstructorDispatchingEventRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+      { new ViolationPosition( 58 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new ConstructorDispatchingEventRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRuleTest.java
new file mode 100644
index 0000000..9d7a0a5
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DefaultEventNameRuleTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.event;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class DefaultEventNameRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "DefaultNameEvent.as", new ViolationPosition[]
+      { new ViolationPosition( 38 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new DefaultEventNameRule();
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRuleTest.java
new file mode 100644
index 0000000..74d3700
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/DispatchHardCodedEventNameRuleTest.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.event;
+
+import com.adobe.ac.pmd.rules.core.AbstractRegExpBasedRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractRegexpBasedRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class DispatchHardCodedEventNameRuleTest extends AbstractRegExpBasedRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.BigImporterModel.as", new ViolationPosition[]
+       { new ViolationPosition( 58 ) } ),
+                  new ExpectedViolation( "AbstractRowData.as", new ViolationPosition[]
+                  { new ViolationPosition( 110 ),
+                              new ViolationPosition( 111 ) } ) };
+   }
+
+   @Override
+   protected String[] getMatchableLines()
+   {
+      return new String[]
+      { "dispatchEvent(new Event(\"change\" ));",
+                  "dispatchEvent( new Event('change') );",
+                  "dispatchEvent(new Event(\"change\"));",
+                  "dispatchEvent( new Event( 'selectedGroupFieldsChange' ) )" };
+   }
+
+   @Override
+   protected AbstractRegexpBasedRule getRegexpBasedRule()
+   {
+      return new DispatchHardCodedEventNameRule();
+   }
+
+   @Override
+   protected String[] getUnmatchableLines()
+   {
+      return new String[]
+      { "var i : int = 0;",
+                  "lala();",
+                  "dispatchEvent( new Event( CONST ) );",
+                  "dispatchEvent(new Event(Rule.CONST));" };
+   }
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b0fc5f17/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRuleTest.java
----------------------------------------------------------------------
diff --git a/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRuleTest.java b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRuleTest.java
new file mode 100644
index 0000000..23407fc
--- /dev/null
+++ b/FlexPMD/flex-pmd-ruleset/src/test/java/com/adobe/ac/pmd/rules/event/EventMissingCloneFunctionRuleTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.adobe.ac.pmd.rules.event;
+
+import com.adobe.ac.pmd.rules.core.AbstractAstFlexRuleTest;
+import com.adobe.ac.pmd.rules.core.AbstractFlexRule;
+import com.adobe.ac.pmd.rules.core.ViolationPosition;
+
+public class EventMissingCloneFunctionRuleTest extends AbstractAstFlexRuleTest
+{
+   @Override
+   protected ExpectedViolation[] getExpectedViolatingFiles()
+   {
+      return new ExpectedViolation[]
+      { new ExpectedViolation( "com.adobe.ac.ncss.SearchBarEvent.as", new ViolationPosition[]
+       { new ViolationPosition( 35 ) } ),
+                  new ExpectedViolation( "com.adobe.ac.ncss.event.FirstCustomEvent.as",
+                                         new ViolationPosition[]
+                                         { new ViolationPosition( 33 ) } ) };
+   }
+
+   @Override
+   protected AbstractFlexRule getRule()
+   {
+      return new EventMissingCloneFunctionRule();
+   }
+}


Mime
View raw message