Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 98 Next »

Live 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.


  1. Install the plugin through the Update Center or download it into the SONARQUBE_HOME/extensions/plugins directory
  2. Restart the SonarQube server


Run an Analysis with the SonarQube Runner (Recommended Way)

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 an 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.


FlexPMD engine - that is embedded in the Flex plugin, suffers from some bugs which can break the SonarQube analyses. Here are some of them you might encounter if FlexPMD rules are activated in the Flex quality profile that 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 make FlexPMD engine crash:
    • in MXML files:



    • in AS files:



Change Log


Version 1.2 (29 issues)

T Key Summary P
New Feature SONARPLUGINS-2076 Support ActionScript 2 Major
Bug SONARPLUGINS-2072 Unable to parse some files Major
Bug SONARPLUGINS-2207 flex pmd mxml file incorrectly identifies script and metadata blocks Major
Bug SONARPLUGINS-2206 Flex grammar is incorrect Major
Task SONARPLUGINS-2199 Remove metric comment_blank_lines Major
Bug SONARPLUGINS-2195 Grammar: incorrect AST for expression statement "b = a- 1" (no space between identifier and minus) Major
New Feature SONARPLUGINS-2181 Make the Flex plugin support the Developer Cockpit plugin by providing the measures comments and loc by line Major
Improvement SONARPLUGINS-2281 Severity of rule CommentedCode should be major by default, but not blocker Major
Bug SONARPLUGINS-2279 Grammar: ActionScript 3 syntactic keywords can be used as identifiers Major
Bug SONARPLUGINS-2280 Rule NestedIfDepthCheck should not produce false-positive in case of 'if-else-if' Major
Bug SONARPLUGINS-2277 Labelled statement should not be included into metric 'statements' Major
Improvement SONARPLUGINS-2275 Grammar: support "set variable" statement Major
Bug SONARPLUGINS-2273 Grammar: Should be possible to use xml namespaces Major
Bug SONARPLUGINS-2272 Grammar: Should be possible to use keyword as a name of xml node or attribute Major
Improvement SONARPLUGINS-2274 Grammar: support "intrinsic" keyword Major
Bug SONARPLUGINS-2271 Grammar: "include" / "import" and "use namespace" directives can be used as a statement Major
Bug SONARPLUGINS-2270 Grammar: semicolon can be omitted at the end of import/use namespace/include as for any other statement Major
New Feature SONARPLUGINS-2252 Rule: Do not use statements, operators and keywords specific to ActionScript 2 Major
Improvement SONARPLUGINS-2251 Grammar: support deprecated operators Major
Bug SONARPLUGINS-2246 Grammar: xml binding should be allowed for tag name and for attribute Major
Showing 20 out of 29 issues Refresh



Version 1.1 (26 issues)

Showing 20 out of 26 issues Refresh



Version 1.0.1 (2 issues)


  • No labels