Difference between revisions of "Including Other Results"
(→Example sonar-project.properties) |
(→Viewing it on the Dashboard) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 47: | Line 47: | ||
sonar.lingoport.project.root=. |
sonar.lingoport.project.root=. |
||
</pre> |
</pre> |
||
+ | |||
+ | = Viewing it on the Dashboard = |
||
+ | Once sonar-runner is successfully run and the Dashboard is updated, it will show the '''two modules''': |
||
+ | |||
+ | [[File:MultiProgrammingLanguages.png|700px|center]] |
||
+ | |||
+ | You can now <b>click on each module</b> to see its results: |
||
+ | |||
+ | *Let's click on the '''Lingoport''' module and look at these issues: |
||
+ | [[File:LingoportProgrammingLanguages.png|700px|center]] |
||
+ | |||
+ | *Let's click on the '''Java''' module and look at those issues: |
||
+ | [[File:JavaProgrammingLanguages.png|700px|center]] |
Latest revision as of 22:46, 29 January 2016
Context
The Globalyzer and LRM issues are shown on the Dashboard using a specific Quality Profile and a number of plugins on the SonarQube platform. You may have other checks running on your code which you would like to report on the Dashboard, or vice-versa, you may have a SonarQube Platform on which you may want to add Globalization tracking from Lingoport.
A Quality Profile is a set of checks set up for a given programming language. (See http://docs.sonarqube.org/display/SONAR/Quality+Profiles ). Lingoport needs to cover a number of programming languages and we define the 'lport' language in order to associate globalization issue to the scanned code. A typical quality profile for Java is 'SonarWay'. In this illustrative example, we show how to have both Lingoport results and Java 'SonarWay' results on the same project.
Modules
When an application or a project in a repository has many programming languages, it is typical that some, say, C code is in a different module than, say, Java code. The SonarQube provides for setting up modules to cover different part of the repository with different programming language rules/quality profiles.
In our world, it is actually the same code which is analyzed by different sets of rules / quality profiles. So we need to set up modules on the same code, not in different modules. This may be confusing.
Example sonar-project.properties
In this example,
- there will be two modules,
lingoport
andjava
- the project source is located at
/var/lib/jenkins/World-Wind-Java-Multi
and each module will point to that location - the GlobalyzerScans and LRMScan is located right under that top level directory, hence the "." for
sonar.lingoport.project.root
- The GlobalyzerScans and LRMScans directory are excluded from any analysis, hence the value for
sonar.exclusions
Here is what the file looks like:
#Example of the sonar-project.properties file that is located in the base project folder. #The LRMScans and GlobalyzerScans folder are also located at the same level # Multi-languages are defined (lport and java) # Modules inherit properties set at parent level sonar.projectKey=WorldWindJavaMultiLang:scan sonar.projectName=WorldWindJavaMultiLang sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 sonar.exclusions=**/LRMScans/*.*, **/GlobalyzerScans/*.* # Set modules IDs sonar.modules=lingoport,java # Module Lingoport lingoport.sonar.language=lport lingoport.sonar.sources=/var/lib/jenkins/World-Wind-Java-Multi lingoport.sonar.projectBaseDir=/var/lib/jenkins/World-Wind-Java-Multi #Module java java.sonar.language=java java.sonar.sources=/var/lib/jenkins/World-Wind-Java-Multi java.sonar.projectBaseDir=/var/lib/jenkins/World-Wind-Java-Multi # -- Lingoport specific attributes -- sonar.lingoport.project.root=.
Viewing it on the Dashboard
Once sonar-runner is successfully run and the Dashboard is updated, it will show the two modules:
You can now click on each module to see its results:
- Let's click on the Lingoport module and look at these issues:
- Let's click on the Java module and look at those issues: