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

Installation

  1. Install the Flex plugin through the Update Center or download it into the SONAR_HOME/extensions/plugins directory
  2. Restart the Sonar server

Usage

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

To launch a Sonar 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 Sonar 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 have unit test results in your Sonar dashboard, execute your unit tests before running the Sonar analysis and use the "sonar.dynamicAnalysis=reuseReports" property along with the "sonar.surefire.reportsPath" one to specify where Sonar should retrieve the XML reports.

Since version 0.4 you can provide the path to the code coverage report (in cobertura xml format) using the "sonar.cobertura.reportPath" property.

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.

Change Log

Release 1.2 (29 issues)
Type Key Summary Priority Status
Improvement SONARPLUGINS-2048 Upgrade to SSLR 1.14 Major Closed
New Feature SONARPLUGINS-2076 Support ActionScript 2 Major Closed
Bug SONARPLUGINS-2072 Unable to parse some files Major Closed
New Feature SONARPLUGINS-1999 Rule: Functions shall have a single point of exit at the end of the function Major Closed
New Feature SONARPLUGINS-2181 Make the Flex plugin support the Developer Cockpit plugin by providing the measures comments and loc by line Major Closed
Bug SONARPLUGINS-2214 Prevent conflicts in l10n of description for Flex rules Major Closed
New Feature SONARPLUGINS-2211 Embed the sonar-common-rules library Major Closed
Bug SONARPLUGINS-2206 Flex grammar is incorrect Major Closed
Bug SONARPLUGINS-2207 flex pmd mxml file incorrectly identifies script and metadata blocks Major Closed
Task SONARPLUGINS-2199 Remove metric comment_blank_lines Major Closed
Bug SONARPLUGINS-2195 Grammar: incorrect AST for expression statement "b = a- 1" (no space between identifier and minus) Major Closed
Improvement SONARPLUGINS-2281 Severity of rule CommentedCode should be major by default, but not blocker Major Closed
Bug SONARPLUGINS-2280 Rule NestedIfDepthCheck should not produce false-positive in case of 'if-else-if' Major Closed
Bug SONARPLUGINS-2279 Grammar: ActionScript 3 syntactic keywords can be used as identifiers Major Closed
Bug SONARPLUGINS-2277 Labelled statement should not be included into metric 'statements' Major Closed
Improvement SONARPLUGINS-2275 Grammar: support "set variable" statement Major Closed
Bug SONARPLUGINS-2272 Grammar: Should be possible to use keyword as a name of xml node or attribute Major Closed
Bug SONARPLUGINS-2273 Grammar: Should be possible to use xml namespaces Major Closed
Improvement SONARPLUGINS-2274 Grammar: support "intrinsic" keyword Major Closed
Bug SONARPLUGINS-2271 Grammar: "include" / "import" and "use namespace" directives can be used as a statement Major Closed
Bug SONARPLUGINS-2270 Grammar: semicolon can be omitted at the end of import/use namespace/include as for any other statement Major Closed
New Feature SONARPLUGINS-2252 Rule: Do not use statements, operators and keywords specific to ActionScript 2 Major Closed
Improvement SONARPLUGINS-2251 Grammar: support deprecated operators Major Closed
New Feature SONARPLUGINS-2247 Provide new version of sslr-flex-toolkit instead of flex-devkit Major Closed
Bug SONARPLUGINS-2246 Grammar: xml binding should be allowed for tag name and for attribute Major Closed
Improvement SONARPLUGINS-2245 Rule: SwitchWithoutDefault should check that default-clause is the last one Major Closed
Bug SONARPLUGINS-2244 Grammar: switch statement requires default case to be last but should be allowed at any position Major Closed
New Feature SONARPLUGINS-2238 Rule: An unconditional break statement shall terminate every non-empty switch-clause Major Closed
Bug SONARPLUGINS-2237 Typo in description of Flex XPath rule Major Closed

Release 1.1 (26 issues)
Type Key Summary Priority
Bug SONARPLUGINS-670 Different number of violations reported on different OSs Major
Bug SONARPLUGINS-793 Maven Sonar goal will not execute Major
Improvement SONARPLUGINS-959 Remove dependency on Maven Major
Bug SONARPLUGINS-922 In mutiproject fails when it trying run PMD on the parent POM Major
New Feature SONARPLUGINS-1938 Rule: Avoid switch statement without a "default" clause Major
New Feature SONARPLUGINS-1928 Rule: Detect commented-out lines of code Major
New Feature SONARPLUGINS-1927 Rule: Avoid too complex file Major
New Feature SONARPLUGINS-1920 Rule: Regular expression on comment Major
New Feature SONARPLUGINS-1918 Rule: Avoid deeply nested if statements Major
New Feature SONARPLUGINS-1917 Rule: One statement per line Major
New Feature SONARPLUGINS-1915 Rule: Avoid too complex method Major
New Feature SONARPLUGINS-1916 Rule: Avoid usage of with statement Major
New Feature SONARPLUGINS-1835 Provide a default SQALE mapping for the Flex rules Major
New Feature SONARPLUGINS-1910 Rule: When there is a parsing error, this error should be added like a violation on that Flex file Major
New Feature SONARPLUGINS-1911 Provide "Sonar Way" profile for Flex Major
New Feature SONARPLUGINS-1914 Rule: Avoid too complex class Major
New Feature SONARPLUGINS-1913 Metric: statements Major
New Feature SONARPLUGINS-1919 Rule: Line too long Major
New Feature SONARPLUGINS-1912 Metric: blank comments Major
New Feature SONARPLUGINS-1907 Provide Flex rule engine based on SSLR Major
New Feature SONARPLUGINS-1906 Integrate Flex parser based on SSLR Major
New Feature SONARPLUGINS-1905 Rule: Generic Flex rule to define some homemade checks with an XPath expression Major
Improvement SONARPLUGINS-1708 On Flex projects, replace the "distribution of complexity by class" by the "distribution of complexity by file" Major
Bug SONARPLUGINS-1762 Unable to reuse existing coverage report for Flex project Major
Bug SONARPLUGINS-1531 LOC counter is broken Major
Improvement SONARPLUGINS-1785 Update default Flex PMD rules Minor

 

Release 1.0.1 (2 issues)
Type Key Summary Priority
Bug SONARPLUGINS-1732 Downgrade the requirement from JDK 1.6 to 1.5 Major
Bug SONARPLUGINS-1597 Unable to use Sonar Flex Plugin with Java 7 Major

 

Release 1.0 (12 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-424 Replace FlexCpd by Sonar CPD Major
New Feature SONARPLUGINS-316 Add the ability to exclude sources Major
Bug SONARPLUGINS-745 Confusing Flex PMD rules name Major
Improvement SONARPLUGINS-903 Add support for MXML files Major
Improvement SONARPLUGINS-1667 Make the Flex plugin compatible with SCM activity plugin Major
Improvement SONARPLUGINS-1666 Refactor resource handling to use standard API Major
Bug SONARPLUGINS-1685 An unnamed folder appears if at least one source file is in the base source directory Major
New Feature SONARPLUGINS-1559 Cross project duplication detection for Flex Major
Improvement SONARPLUGINS-1623 Should be possible to use dollars in class names Major
Bug SONARPLUGINS-1600 Capability to make difference between message and name of a rule Major
Bug SONARPLUGINS-1355 Sonar doesn't support inner classes in a Java Flex application Major
Bug SONARPLUGINS-1062 Ability to view source for MXML files Major

 

Release 0.4 (3 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-310 Should use Stax instead of XPath to process the FlexMetrics xml Major
Improvement SONARPLUGINS-753 Migrate to new rules api Major
Improvement SONARPLUGINS-540 Ability to reuse an existing coverage reports for Flex projects Major

 

Release 0.3.1 (1 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-741 Use surefire parser provided by sonar-surefire-plugin Major

 

Release 0.3 (8 issues)
Type Key Summary Priority
New Feature SONARPLUGINS-490 Add the ability to override Duplications parameters Major
Bug SONARPLUGINS-425 minimumTokenCount parameter does not seem to be taken into account Major
Improvement SONARPLUGINS-452 Upgrade to FlexCPD 1.1 Major
New Feature SONARPLUGINS-312 Integrate FlexUnit Major
Bug SONARPLUGINS-496 Looks like FlexMetrics does not count properly static methods Major
Task SONARPLUGINS-669 Migrate to sonar-dev-maven-plugin from sonar-dev-mojo for integration tests Major
Bug SONARPLUGINS-666 Test files incorrectly handled by FlexSourceImporter Major
Improvement SONARPLUGINS-623 Update the plugin to FlexPMD / FlexCPD / FlexMetrics 1.2 Major

 

Release 0.2 (1 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-544 Make the plugin compatible with Sonar 2.2 Major

 

Release 0.1 (11 issues)
Type Key Summary Priority
Improvement SONARPLUGINS-309 Comments are not calculated Critical
Bug SONARPLUGINS-429 Plugin Fails after running cpd Major
Bug SONARPLUGINS-426 Issue when package names contain AS Major
Improvement SONARPLUGINS-447 Add the possibility to chosse files extensions to analyze Major
Bug SONARPLUGINS-435 Nullpointer in FlexCpdMavenSensor.java:152 Major
Bug SONARPLUGINS-382 The plugin crashes on multimodule project that do not have source code in the root module Major
New Feature SONARPLUGINS-311 Integrate FlexPMD Major
New Feature SONARPLUGINS-308 Integrate FlexMetrics Major
New Feature SONARPLUGINS-307 Create a plugin to analyze ActionScript Major
Bug SONARPLUGINS-318 A class that has no package does not get reported in Sonar Major
New Feature SONARPLUGINS-327 Integrate CPD to report on duplications Major

Labels
  • None