flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cd...@apache.org
Subject [02/24] git commit: [flex-utilities] [refs/heads/feature/pmd-5.2-language-module] - Initial commit of the PMD language module for Apache Flex
Date Sat, 07 Mar 2015 12:06:55 GMT
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/FirstCustomEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/FirstCustomEvent.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/FirstCustomEvent.as
new file mode 100644
index 0000000..ff58ac3
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/FirstCustomEvent.as
@@ -0,0 +1,30 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 
+{
+   public class FirstCustomEvent extends Event
+   {
+      public var lala : String;
+      
+      public function FirstCustomEvent()
+      {
+         
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/SecondCustomEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/SecondCustomEvent.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/SecondCustomEvent.as
new file mode 100644
index 0000000..4628a40
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/event/SecondCustomEvent.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 
+{
+   public class SecondCustomEvent extends CairngormEvent
+   {
+      public function SecondCustomEvent()
+      {
+      	super("myDomain.SecondCustomEvent");
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList.mxml b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList.mxml
new file mode 100644
index 0000000..fa4e297
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList.mxml
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<component:ScrawlGrid xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:component="com.adobe.ac.anthology.utils.components.*">
+   <!--
+       lalala 
+       -->
+   <mx:Script>
+      <![CDATA[
+         import com.adobe.ac.anthology.model.object.IterationModelLocator;
+         
+         import mx.collections.ArrayCollection;
+         
+         public var lala : int = 1;
+         public var toto : int = 2;
+
+         private var _selectedIteration : Iteration;
+         
+         public function set selectedIteration(value : Iteration) : void
+         {
+           for (var i : uint = 0; i < (dataProvider as ArrayCollection).length; i++) {
+               var currentId : uint = dataProvider[i].id;
+               if (currentId == value.id) {
+                  selectedItem = dataProvider[i];
+                  return;
+               }  
+            }
+         }
+         
+         public function set selectedIteration(value : Iteration) : void
+         {
+           for (var i : uint = 0; i < (dataProvider as ArrayCollection).length; i++) {
+               var currentId : uint = dataProvider[i].id;
+               if (currentId == value.id) {
+                  selectedItem = dataProvider[i];
+                  return;
+               }  
+            }
+         }
+         
+
+         public function set selectedIteration(value : Iteration) : void
+         {
+           for (var i : uint = 0; i < (dataProvider as ArrayCollection).length; i++) {
+               var currentId : uint = dataProvider[i].id;
+               if (currentId == value.id) {
+                  selectedItem = dataProvider[i];
+                  return;
+               }  
+            }
+         }
+         
+         private function displayTitle(item : Object, column : DataGridColumn) : String // No PMD UseObjectTypeRule
+         {
+            var i  : Iteration = Iteration( item ); // NO PMD
+            
+            return "#" + i.iterationNumber.toString() + " " + i.status;
+         }
+
+		  public function get modelLocator() : FlexUnitLabelsModelLocator
+		  {
+			  return FlexUnitLabelsModelLocator.instance;
+		  }
+      ]]>
+   </mx:Script>
+   
+   <component:columns>
+   
+      <mx:DataGridColumn dataField="iterationNumber" headerText="{ lala.lala }" labelFunction="displayTitle"/>
+      
+   </component:columns>   
+   
+</component:ScrawlGrid>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList2.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList2.mxml b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList2.mxml
new file mode 100644
index 0000000..ec09be3
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/IterationsList2.mxml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<component:ScrawlGrid xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:component="com.adobe.ac.anthology.utils.components.*" text="{ vfrfr.frfr.frf }">
+   <!--
+       lalala 
+       -->
+   <mx:Script>
+      <![CDATA[
+         import com.adobe.ac.anthology.model.object.Iteration;
+         
+         import mx.collections.ArrayCollection;
+         
+         public var lala : int = 1;
+
+         private var _selectedIteration : Iteration;
+         public static function myInit() : void {}
+      ]]>
+   </mx:Script>
+   
+   <component:columns>
+   
+      <mx:DataGridColumn dataField="iterationNumber" headerText="Iterations" labelFunction="displayTitle" text="{ vfrfr.frfr.frf.lala }"/>
+      
+   </component:columns>   
+   
+</component:ScrawlGrid>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/NestedComponent.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/NestedComponent.mxml b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/NestedComponent.mxml
new file mode 100644
index 0000000..8b4de62
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/ac/ncss/mxml/NestedComponent.mxml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<component:ScrawlGrid xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:component="com.adobe.ac.anthology.utils.components.*">
+   
+   <mx:VBox>
+      
+      <mx:HBox>
+         
+         <mx:Panel>
+            
+         </mx:Panel>
+         
+      </mx:HBox>
+
+     <mx:Canvas>
+        
+        <Accordeon>
+           
+        </Accordeon>
+     
+     </mx:Canvas>
+         
+   </mx:VBox>
+   
+</component:ScrawlGrid>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/cairngorm/work/SequenceWorkFlow.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/cairngorm/work/SequenceWorkFlow.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/cairngorm/work/SequenceWorkFlow.as
new file mode 100644
index 0000000..a26ed35
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/com/adobe/cairngorm/work/SequenceWorkFlow.as
@@ -0,0 +1,19 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.cairngorm.work
{
   import mx.logging.ILogger;
   import mx.logging.Log;
   
   /**
    * A work-flow that processes its children in sequence. The next child is
    * started only when the previous child completes.
    */ 
   public class SequenceWorkFlow extends WorkFlow
   {
      //------------------------------------------------------------------------
      //
      //  Constants
      //
      //------------------------------------------------------------------------

      private static const LOG : ILogger = 
         Log.getLogger( "com.adobe.cairngorm.work.SequenceWorkFlow" );
         
      //------------------------------------------------------------------------
      //
      //  Private Variables
      //
      //------------------------------------------------------------------------

      /** The index of the work-item currently processing. */
      private var currentIndex : uint = 0;
      
      //----------------------------------------------
 --------------------------
      //
      //  Constructor
      //
      //------------------------------------------------------------------------

      public function SequenceWorkFlow()
      {
         super();
      }

      //------------------------------------------------------------------------
      //
      //  Implementation : WorkItem
      //
      //------------------------------------------------------------------------

      override protected function performWork() : void
      {
         if ( Log.isDebug() )
         {
            LOG.debug( 
               "Starting sequence work-flow: label={0}, children={1}, size={2}",
               label,
               children.length,
               size );
         }
         
         startNextWorkItem();
      }
      
      //------------------------------------------------------------------------
      //
      //  Overrides : WorkFlow
      //
      //-----------------------------------------------------------------
 -------

      override protected function onChildWorkComplete( event : WorkEvent ) : void
      {
         super.onChildWorkComplete( event );

         startNextWorkItem();
      }
      
      override protected function onChildWorkFault( event : WorkEvent ) : void
      {
         super.onChildWorkFault( event );

         if ( Log.isError() )
         {
            LOG.error( "Fault during sequence work-flow: label={0}", label );
         }

         fault( event.message );
      }

      //------------------------------------------------------------------------
      //
      //  Private methods
      //
      //------------------------------------------------------------------------

      private function startNextWorkItem() : void
      {
         if ( hasMoreWorkItems )
         {
            final var skipped : Boolean = processChild( getNextChild() ) == false;
            
            if ( skipped )
            {
               startNextWorkItem();
            } 
       
   }
         else
         {
            if ( Log.isDebug() )
            {
               LOG.debug( "Completed sequence work-flow: label={0}", label );
            }

            complete();
         }
      }

      private function get hasMoreWorkItems() : Boolean
      {
         return children && currentIndex < children.length;
      }

      private function getNextChild() : IWorkItem
      {
         return children[ currentIndex++ ] as IWorkItem;
      }
   }
}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.as
new file mode 100644
index 0000000..0c6fb82
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.as
@@ -0,0 +1,18 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.mxml b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.mxml
new file mode 100644
index 0000000..2f32d30
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/empty/Empty.mxml
@@ -0,0 +1,18 @@
+<!--
+
+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.
+
+-->

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.as
new file mode 100644
index 0000000..a48f4e0
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+   public class MyPopup extends Canvas
+   {
+      public function MyPopup()
+      {
+         filters = [ new DropShadowFilter() ];
+      }   
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.mxml b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.mxml
new file mode 100644
index 0000000..40ad830
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/filters/MyPopup.mxml
@@ -0,0 +1,32 @@
+<!--
+
+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.
+
+-->
+<mx:Canvas
+   xmlns:mx="http://www.adobe.com/2006/mxml"
+   xmlns:view="com.view.core.gui.*"
+   showFlexChrome="false"
+   layout="absolute"
+   height="768" width="1024"
+   applicationComplete="facade.startup(this)"
+   creationComplete="currentState='defaultLoginWindowState'"
+   filters="{ [ new DropShadowFilter() ]}"
+   >
+   <mx:filters>
+      <mx:DropShadowFilter/>
+   </mx:filters>
+</mx:Canvas>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/a/Test.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/a/Test.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/a/Test.as
new file mode 100644
index 0000000..b0007b9
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/a/Test.as
@@ -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 a
+{
+	import mx.controls.Alert;
+	
+	public class Test
+	{
+		public function Test()
+		{
+		}
+		
+		public function alert():void {
+			var o:Object = new Object();
+			Alert.show("A");
+			function localFunction(): void {}
+			var functionVarFunction:Function = function(): void { }
+				
+			functionVarFunction();
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/b/Test.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/b/Test.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/b/Test.as
new file mode 100644
index 0000000..161bef8
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/b/Test.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 b
+{
+	import mx.controls.Alert;
+	
+	public class Test
+	{
+		public function Test()
+		{
+		}
+		
+		public function alert():void {
+			var o:Object = new Object();
+			Alert.show("B");
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/c/Test.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/c/Test.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/c/Test.as
new file mode 100644
index 0000000..0bba9e8
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexpmd114/c/Test.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 c
+{
+	import mx.controls.Alert;
+	
+	public class Test
+	{
+		public function Test()
+		{
+		}
+		
+		public function alert():void {
+			var o:Object = new Object();
+			Alert.show("C");
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RaoulTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RaoulTest.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RaoulTest.as
new file mode 100644
index 0000000..2606372
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RaoulTest.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 suite.cases
+{
+    import flexunit.framework.TestCase;
+
+    import math.RaoulUtil;
+
+    public class RaoulTest
+    {
+        private var classToTestRef : math.RaoulUtil;
+        private static var _allowEdit : ArrayCollection = new ArrayCollection( [ COMMENT_ADDED, COMMENT_UPDATED ] );
+
+        private static var _locked : Boolean;
+        {
+        	loacked = true;
+        }
+
+        [Before]
+        public function setUp() : void
+        {
+            classToTestRef = new RaoulUtil();
+        }
+
+        [Test]
+        public function foo() : void
+        {
+            classToTestRef.foo1();
+        }
+
+        [Test]
+        public function fooAgain() : void
+        {
+            classToTestRef.foo();
+        }
+
+        public static function editAllowed( status : ActionItemCommentStatus ) : Boolean
+        {
+            return _allowEdit.contains( status );
+        }
+
+        /** Locked constructor will fail if used outside of the enum class */
+        public function RaoulTest( key : int, name : String )
+        {
+            if ( _locked )
+            {
+                throw new Error( "Enumeration constructor is private, do not use externally" );
+            }
+            _key = key;
+            _name = name;
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RulesetTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RulesetTest.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RulesetTest.as
new file mode 100644
index 0000000..fc6819b
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/flexunit/RulesetTest.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.model
+{
+   import com.adobe.ac.pmd.control.events.GetRulesetContentEvent;
+   import com.adobe.ac.pmd.model.events.RulesetReceivedEvent;
+   
+   import flexunit.framework.CairngormEventSource;
+   import flexunit.framework.EventfulTestCase;
+   
+   import mx.collections.ArrayCollection;
+
+   public class RulesetTest extends EventfulTestCase
+   {
+      override public function setUp():void
+      {
+         model = new Ruleset();
+      }
+      
+      public function testGetRulesetContent() : void
+      {
+         model.getRulesetContent( "ref" );
+      }
+      
+      public function testOnReceiveRulesetContent() : void
+      {
+         var receivedRuleset : Ruleset = new Ruleset();
+         
+         listenForEvent( model, RulesetReceivedEvent.EVENT_NAME );
+         
+         receivedRuleset.name = "name";
+         receivedRuleset.description = "description";
+         receivedRuleset.rules = new ArrayCollection();
+         receivedRuleset.rulesets = new ArrayCollection();
+         
+         model.onReceiveRulesetContent( receivedRuleset );
+         
+         assertEvents();
+         assertEquals( model, RulesetReceivedEvent( lastDispatchedExpectedEvent ).ruleset );
+         assertEquals( receivedRuleset.name, model.name );
+         assertEquals( receivedRuleset.description, model.description );
+         assertEquals( receivedRuleset.rules, model.rules );
+         assertEquals( receivedRuleset.rulesets, model.rulesets );
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/Main.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/Main.mxml b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/Main.mxml
new file mode 100644
index 0000000..c98afcc
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/Main.mxml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
+    <mx:Text text="Hello World!"/>
+</mx:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/TestRunnerApplication.mxml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/TestRunnerApplication.mxml b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/TestRunnerApplication.mxml
new file mode 100644
index 0000000..a1fe0eb
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/main/flex/TestRunnerApplication.mxml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  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.
+
+-->
+<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
+               xmlns:mx="library://ns.adobe.com/flex/halo"
+               xmlns:s="library://ns.adobe.com/flex/spark" minHeight="768" minWidth="1024"
+               creationComplete="runTests()">
+    <s:layout>
+        <s:BasicLayout/>
+    </s:layout>
+
+    <fx:Script>
+        <![CDATA[
+            import org.sonatype.flexmojos.unitestingsupport.ControlSocket;
+            import org.sonatype.flexmojos.unitestingsupport.SocketReporter;
+
+
+            private var suites:Array = [MySuite];
+
+            private static var socketReporter:SocketReporter = SocketReporter.getInstance();
+
+            private static var controlSocket:ControlSocket = ControlSocket.getInstance();
+
+            private function runTests():void
+            {
+                socketReporter.port = 13539;
+                controlSocket.port = 13540;
+                controlSocket.connect();
+                socketReporter.runTests(suites);
+            }
+        ]]>
+    </fx:Script>
+
+</s:Application>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MySuite.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MySuite.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MySuite.as
new file mode 100644
index 0000000..f9e8b46
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MySuite.as
@@ -0,0 +1,26 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{	
+	[Suite]
+	[RunWith("org.flexunit.runners.Suite")]	
+	public class MySuite {		
+		public var myTest:MyTest;		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MyTest.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MyTest.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MyTest.as
new file mode 100644
index 0000000..fcff4db
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/fu/test/flex/MyTest.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import org.flexunit.assertThat;
+
+	public class MyTest {		
+		
+		[Test]
+		public function dummyTest():void
+		{
+			assertThat(true);
+		}
+
+		private static var eventDispatcher:EventDispatcher = new EventDispatcher();
+		
+		[Test(async)]
+		public function dummyTestFlexPMD132Async():void
+		{
+			Async.handleEvent(this, eventDispatcher, "myEvent", eventHandler);
+			eventDispatcher.dispatchEvent(new Event("myEvent")); // NO PMD DispatchHardCodedEventName
+		}
+		
+		private function eventHandler(event:Event, ptd:*):void // NO PMD UnusedParameter,UseGenericType
+		{
+			Assert.assertTrue(true);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/FunctionalClient.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/FunctionalClient.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/FunctionalClient.as
new file mode 100644
index 0000000..df50a14
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/FunctionalClient.as
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 functional
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func1.restricted.Func1RestrictedClass; // VIOLATION
+	import functional.func2.api.Func2ExposedClass;
+	import functional.func2.restricted.Func2RestrictedClass; // VIOLATION
+	
+	public class FunctionClient
+	{
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/api/Func1ExposedClass.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/api/Func1ExposedClass.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/api/Func1ExposedClass.as
new file mode 100644
index 0000000..6461d6e
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/api/Func1ExposedClass.as
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 functional.func1.api
+
+{
+	import functional.func1.restricted.Func1RestrictedClass; 
+	import functional.func2.api.Func2ExposedClass;
+	import functional.func2.restricted.Func2RestrictedClass; // VIOLATION
+	
+	public class Func1ExposedClass
+	{
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/restricted/Func1RestrictedClass.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/restricted/Func1RestrictedClass.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/restricted/Func1RestrictedClass.as
new file mode 100644
index 0000000..9ad7ba2
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func1/restricted/Func1RestrictedClass.as
@@ -0,0 +1,29 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 functional.func1.restricted
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func2.api.Func2ExposedClass;
+	import functional.func2.restricted.Func2RestrictedClass; // VIOLATION
+	
+	public class Func1RestrictedClass extends EventDispatcher
+	{
+		public var publicVar : Boolan;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/api/Func2ExposedClass.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/api/Func2ExposedClass.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/api/Func2ExposedClass.as
new file mode 100644
index 0000000..2a2f5d4
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/api/Func2ExposedClass.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 functional.func2.api
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func1.restricted.Func1RestrictedClass; // VIOLATION
+	import functional.func2.restricted.Func2RestrictedClass;
+	
+	public class Func2ExposedClass
+	{
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/restricted/Func2RestrictedClass.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/restricted/Func2RestrictedClass.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/restricted/Func2RestrictedClass.as
new file mode 100644
index 0000000..73f1789
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/functional/func2/restricted/Func2RestrictedClass.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 functional.func2.restricted
+{
+	import functional.func1.api.Func1ExposedClass;
+	import functional.func1.restricted.Func1RestrictedClass; // VIOLATION
+	import functional.func2.api.Func2ExposedClass;
+	
+	public class Func2RestrictedClass
+	{
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/mx/controls/DateChooser2.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/mx/controls/DateChooser2.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/mx/controls/DateChooser2.as
new file mode 100644
index 0000000..8900d5b
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/mx/controls/DateChooser2.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 mx.controls
+{
+	public class DateChooser extends UIComponent implements IFocusManagerComponent, IFontContextComponent
+	{
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/org/as3commons/concurrency/thread/Color.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/org/as3commons/concurrency/thread/Color.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/org/as3commons/concurrency/thread/Color.as
new file mode 100644
index 0000000..9265cf3
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/org/as3commons/concurrency/thread/Color.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 org.as3commons.concurrency.threads
+{
+	public interface Color
+	{
+		function foo() : void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaData.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaData.as
new file mode 100644
index 0000000..307ab35
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaData.as
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   [Event(name="message", type="flash.events.Event")]
+   public class InaccessibleMetaData
+   {
+      public var publicVar;
+	  
+      [Inject] // VIOLATION
+      private var privateVar : String;
+      
+      [Inject]
+      public function set publicSetter( value : String ) : void
+      {
+         privateSetter = value;
+      }
+	  
+      [Inject] // VIOLATION
+      private function set privateSetter( value : String ) : void
+      {
+         publicVar = value;
+      }
+
+      [MessageHandler]
+	   public function publicFunction( event : MyEvent ) : void
+	   {
+         privateFunction( event );
+	   }
+
+	   [MessageHandler] // VIOLATION
+      private function privateFunction( event : MyEvent ) : void
+      {
+         privateVar = event.toString();
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaDataInternalClass.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaDataInternalClass.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaDataInternalClass.as
new file mode 100644
index 0000000..e05cd20
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/InaccessibleMetaDataInternalClass.as
@@ -0,0 +1,25 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   [AsyncInit]
+   internal class InaccessibleMetaDataInternalClass
+   {
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MessageInterceptorSignature.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MessageInterceptorSignature.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MessageInterceptorSignature.as
new file mode 100644
index 0000000..2cac794
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MessageInterceptorSignature.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   public class MessageInterceptorSignature
+   {
+      [MessageInterceptor(type="a.b.MyMessage")]
+      public function messageInterceptor( processor : MessageProcessor ) : void
+      {
+         processor.proceed();
+      }
+
+      [MessageInterceptor(type="a.b.MyMessage")]
+      public function messageInterceptor() : void // VIOLATION
+      {
+      }
+
+      [MessageInterceptor(type="a.b.MyMessage")]
+      public function messageInterceptor( type : MyMessage ) : void // VIOLATION
+      {
+         type.something();
+      }
+
+      [MessageInterceptor(type="a.b.MyMessage")]
+      public function messageInterceptor( processor : MessageProcessor, type : MyMessage ) : void // VIOLATION
+      {
+         processor.proceed();
+         type.something();
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MismatchedManagedEvent.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MismatchedManagedEvent.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MismatchedManagedEvent.as
new file mode 100644
index 0000000..d5af8df
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MismatchedManagedEvent.as
@@ -0,0 +1,28 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   [Event(name="messageA", type="flash.events.Event")]
+   [Event(name="messageB", type="flash.events.Event")]
+   [ManagedEvents(names="messageA,messageB")]
+   [ManagedEvents(names="messageC")] // VIOLATION
+   public class MismatchedManagedEvent
+   {
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MisplacedMetaData.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MisplacedMetaData.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MisplacedMetaData.as
new file mode 100644
index 0000000..71c1e2c
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/MisplacedMetaData.as
@@ -0,0 +1,65 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   [Inject] // VIOLATION
+   [MessageBinding(type="a.b.MyMessage", messageProperty="a")] // VIOLATION
+   [MessageDispatcher] // VIOLATION
+   [MessageError] // VIOLATION
+   [MessageHandler] // VIOLATION
+   [MessageInterceptor] // VIOLATION
+   [Init] // VIOLATION
+   [Destroy] // VIOLATION
+   [ResourceBinding(key="a")] // VIOLATION
+   [Factory] // VIOLATION
+   [ObjectDefinition] // VIOLATION
+   [Target] // VIOLATION
+   [Internal] // VIOLATION
+   public class MisplacedMetaData
+   {
+      [InjectConstructor] // VIOLATION
+      [ManagedEvents(names="a")] // VIOLATION
+      [MessageError] // VIOLATION
+      [MessageHandler] // VIOLATION
+      [MessageInterceptor] // VIOLATION
+      [Init] // VIOLATION
+      [Destroy] // VIOLATION
+      [Factory] // VIOLATION
+      public var property : String;
+      
+      [InjectConstructor] // VIOLATION
+      public function MisplacedMetaData()
+      {
+      }
+      
+      [ManagedEvents(names="a")] // VIOLATION
+      [MessageBinding(type="a.b.MyMessage", messageProperty="a")] // VIOLATION
+      [MessageDispatcher] // VIOLATION
+      [AsyncInit] // VIOLATION
+      [ResourceBinding(key="a")] // VIOLATION
+      [ObjectDefinition] // VIOLATION
+      [Target] // VIOLATION
+      [Internal] // VIOLATION
+      public function doSomething( message : MyMessage ) : void
+      {
+         message.toString();
+         property.toString();
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMessageHandlerTypeAttribute.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMessageHandlerTypeAttribute.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMessageHandlerTypeAttribute.as
new file mode 100644
index 0000000..c67f3a8
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMessageHandlerTypeAttribute.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   public class RedundantMessageHandlerTypeAttribute
+   {
+      [MessageHandler]
+      public function doSomething( message : MyMessage ) : void
+      {
+         message.toString();
+      }
+
+      [MessageHandler(type="a.b.MyMessage")] // VIOLATION
+      public function doSomething( message : MyMessage ) : void
+      {
+         message.toString();
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMethodAttribute.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMethodAttribute.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMethodAttribute.as
new file mode 100644
index 0000000..76cfecb
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/RedundantMethodAttribute.as
@@ -0,0 +1,35 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   public class RedundantMethodAttribute
+   {
+      [MessageHandler]
+      public function doSomething( message : MyMessage ) : void
+      {
+         message.toString();
+      }
+
+      [MessageHandler(method="doSomething")] // VIOLATION
+      public function doSomething( message : MyMessage ) : void
+      {
+         message.toString();
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/UnknownMetaDataAttribute.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/UnknownMetaDataAttribute.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/UnknownMetaDataAttribute.as
new file mode 100644
index 0000000..05b9be4
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/parsley/UnknownMetaDataAttribute.as
@@ -0,0 +1,32 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 parsley
+{
+   [AsyncInit(x="y")] // VIOLATION
+   public class UnknownMetaDataAttribute
+   {
+      [Inject(x="y")] // VIOLATION
+      public var inject;
+
+      [MessageHandler(x="y")] // VIOLATION
+      public function messageHandler() : void
+      {
+      }
+   }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/pseudo/look/IEditLook.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/pseudo/look/IEditLook.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/pseudo/look/IEditLook.as
new file mode 100644
index 0000000..67bc669
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/pseudo/look/IEditLook.as
@@ -0,0 +1,24 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+ 
+interface pseudo.look.IEditLook extends pseudo.look.IBaseLook
+{
+	public function getTextFormat(data:Object):TextFormat;
+	public function getTextDecoration(strType:String, data:Object):String;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/schedule_internal.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/schedule_internal.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/schedule_internal.as
new file mode 100644
index 0000000..74e0e76
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/schedule_internal.as
@@ -0,0 +1,22 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flexlib.scheduling.scheduleClasses
+{
+   public namespace schedule_internal = "http://www.adobe.com/ac/scheduling/internal";
+}

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/src/fw/data/request/ResultListener.as
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/src/fw/data/request/ResultListener.as b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/src/fw/data/request/ResultListener.as
new file mode 100644
index 0000000..90d768a
--- /dev/null
+++ b/FlexPMD/language-module/ruleset/ruleset-flex-basic/src/test/resources/test/src/fw/data/request/ResultListener.as
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.
+//
+////////////////////////////////////////////////////////////////////////////////
+ 
+import src.fw.data.request.Request;
+interface src.fw.data.request.ResultListener
+{
+	public function onResultLoad(request:Request) : Void;
+
+	public function onResultError(request:Request) : Void;
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/utils/pom.xml
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/utils/pom.xml b/FlexPMD/language-module/utils/pom.xml
new file mode 100644
index 0000000..a753d1d
--- /dev/null
+++ b/FlexPMD/language-module/utils/pom.xml
@@ -0,0 +1,42 @@
+<!--
+
+  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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.flex.pmd</groupId>
+        <artifactId>apache-flex-pmd</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>utils</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>${commons-lang.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/ff722d6f/FlexPMD/language-module/utils/src/main/java/org/apache/flex/pmd/utils/FileUtils.java
----------------------------------------------------------------------
diff --git a/FlexPMD/language-module/utils/src/main/java/org/apache/flex/pmd/utils/FileUtils.java b/FlexPMD/language-module/utils/src/main/java/org/apache/flex/pmd/utils/FileUtils.java
new file mode 100644
index 0000000..2c7346b
--- /dev/null
+++ b/FlexPMD/language-module/utils/src/main/java/org/apache/flex/pmd/utils/FileUtils.java
@@ -0,0 +1,164 @@
+/*
+ * 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 org.apache.flex.pmd.utils;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * @author xagnetti
+ */
+public final class FileUtils {
+    public static class FilePathComparator implements Comparator<File> {
+        public int compare(final File arg0,
+                           final File arg1) {
+            return arg0.getAbsolutePath().compareTo(arg1.getAbsolutePath());
+        }
+    }
+
+    /**
+     * @param line
+     * @return
+     */
+    public static boolean isLineACorrectStatement(final String line) {
+        return line.compareTo("") != 0
+                && lrtrim(line).compareTo("{") != 0 && lrtrim(line).compareTo("}") != 0
+                && line.endsWith(";");
+    }
+
+    /**
+     * @param directory
+     * @param filter
+     * @param recurse
+     * @return
+     */
+    public static Collection<File> listFiles(final File directory,
+                                             final FilenameFilter filter,
+                                             final boolean recurse) {
+        final ArrayList<File> files = listFilesRecurse(directory,
+                filter,
+                recurse);
+        Collections.sort(files,
+                new FilePathComparator());
+        return files;
+    }
+
+    /**
+     * @param sourceDirectory
+     * @param filter
+     * @param recurse
+     * @return
+     */
+    public static Collection<File> listFiles(final List<File> sourceDirectory,
+                                             final FilenameFilter filter,
+                                             final boolean recurse) {
+        final ArrayList<File> files = new ArrayList<File>();
+
+        for (final File topDirectory : sourceDirectory) {
+            files.addAll(listFilesRecurse(topDirectory,
+                    filter,
+                    recurse));
+        }
+
+        Collections.sort(files,
+                new FilePathComparator());
+        return files;
+    }
+
+    /**
+     * @param file
+     * @return
+     */
+    public static List<String> readFile(final File file) {
+        final List<String> result = new ArrayList<String>();
+
+        BufferedReader inReader = null;
+        try {
+            final Reader reader = new InputStreamReader(new FileInputStream(file), "UTF-8");
+            inReader = new BufferedReader(reader);
+
+            String line = readLine(inReader);
+
+            while (line != null) {
+                result.add(line);
+                line = readLine(inReader);
+            }
+            inReader.close();
+        } catch (final IOException e) {
+            StackTraceUtils.print(e);
+        }
+        return result;
+    }
+
+    private static ArrayList<File> listFilesRecurse(final File directory,
+                                                    final FilenameFilter filter,
+                                                    final boolean recurse) {
+        final ArrayList<File> files = new ArrayList<File>();
+        final File[] entries = directory.listFiles();
+
+        if (entries != null) {
+            for (final File entry : entries) {
+                if (filter == null
+                        || filter.accept(directory,
+                        entry.getName())) {
+                    files.add(entry);
+                }
+                if (recurse
+                        && entry.isDirectory()) {
+                    files.addAll(listFilesRecurse(entry,
+                            filter,
+                            recurse));
+                }
+            }
+        }
+        return files;
+    }
+
+    private static String lrtrim(final String source) {
+        return ltrim(rtrim(source));
+    }
+
+    /* remove leading whitespace */
+    private static String ltrim(final String source) {
+        return source.replaceAll("^\\s+",
+                "");
+    }
+
+    public static String[] readLines(final File file) throws IOException {
+        List<String> lines = readFile(file);
+        return lines.toArray(new String[lines.size()]);
+    }
+
+    private static String readLine(final BufferedReader inReader) throws IOException {
+        final String line = inReader.readLine();
+
+        if (line != null) {
+            return line.replaceAll("\uFEFF",
+                    "");
+        }
+        return null;
+    }
+
+    /* remove trailing whitespace */
+    private static String rtrim(final String source) {
+        return source.replaceAll("\\s+$",
+                "");
+    }
+
+    private FileUtils() {
+    }
+}


Mime
View raw message