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 92 Next »

Live example

Icon

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

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

Installation

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

Usage

Run a SonarQubeTM Analysis with the Sonar Runner (Recommended Way)

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

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

Run a SonarQubeTM 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 SonarQubeTM 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

Metrics

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.

Troubleshooting

FlexPMD engine - that is embedded in the Flex plugin, suffers from some bugs which can break the SonarQubeTM 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

Loading

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

 

Loading

Version 1.1 (26 issues)

Showing 20 out of 26 issues Refresh

 

Loading

Version 1.0.1 (2 issues)

 

Loading

Version 1.0 (12 issues)

 

Loading

Version 0.4 (3 issues)

 

Loading

Version 0.3.1 (1 issues)

 

Loading

Version 0.3 (8 issues)

 

Loading

Version 0.2 (1 issues)

 

Loading

Version 0.1 (11 issues)

  • No labels