Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
YourDocumentation browserhas doesbeen notmoved support iframes.
titleLive example

If you want to see a live example of the capabilities of the Flex plugin, you can have a look at the analysis of the AS3 Core Lib project on Nemo.

Description / Features

The plugin enables analysis of ActionScript projects within SonarQube.

It is compatible with the Issues Report plugin to run pre-commit local analysis.



Run an Analysis with the SonarQube Runner (Recommended method)

To run an analysis of your Flex project, use the SonarQube Runner.

A sample project is available on github that can be browsed or downloaded: /projects/languages/flex/flex-sonar-runner.

Run an Analysis with the other Analyzers

Maven and Ant can also be used to launch analysis on Flex projects.

Unit Tests and Code Coverage Reports

If you want to display unit test results on dashboards, execute your unit tests before running the SonarQube analysis and set the:

  • sonar.dynamicAnalysis property to reuseReports
  • sonar.surefire.reportsPath property to the path to the directory containing the XML reports
  • sonar.cobertura.reportPath property to the path to the Cobertura XML report


See Metrics documentation page.

Extending Coding Rules using XPath

New coding rules can be added using XPath. See the related documentation.

To navigate the AST, download the SSLR Flex Toolkit.


The FlexPMD engine, which is embedded in the Flex plugin, suffers from some bugs which can break SonarQube analysis. Here are some you might encounter if FlexPMD rules are activated in the Flex quality profile you are using:

  • "fb:purpose="styling" attribute in MXML files causes OutOfMemory errors (see SONARPLUGINS-2400). 
    • Removing it fixes the issue.
  • the following code snippet makes FlexPMD engine crash:
    • in MXML files:
Code Block
        <!-- this crashes FlexPMD --> 
        <!-- this crashes FlexPMD as well (note the space between the 2 opening brackets --> 
                <![CDATA[ [HostComponent("spark.components.ToggleButton")]]]> 
        <!-- this does not crash --> 


    • in AS files:
Code Block
private function foo(partName:String):void 
  switch (partName) 
    case "test": 
    case "foo": 
    case "bar": 
} to [].