[TASK] Add sonarcloud analysis to travis 03/54303/3
authorSusanne Moog <susanne.moog@typo3.com>
Thu, 5 Oct 2017 15:35:09 +0000 (17:35 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 5 Oct 2017 16:55:29 +0000 (18:55 +0200)
Add sonar-project.properties as basic configuration
and add travis configuration for running sonar analyis
on the core.

Resolves: #82685
Releases: master
Change-Id: I6c2886068c81e15e92b3562cf4200f3e80ff59db
Reviewed-on: https://review.typo3.org/54303
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
.travis.yml
Build/.sonar-project.properties [new file with mode: 0644]

index 111476c..eea6529 100644 (file)
@@ -7,16 +7,22 @@ matrix:
     - php: 7
       env: UNIT_TESTS=yes
 
-sudo: false
+sudo: required
 
 addons:
   apt:
     packages:
       - language-pack-de
+  sonarcloud:
+    organization: "typo3"
+
+jdk:
+  - oraclejdk8
 
 cache:
   directories:
     - $HOME/.composer/cache
+    - $HOME/.sonar/cache
 
 services:
   - memcached
@@ -52,3 +58,4 @@ script:
     if [[ "$UNIT_TESTS" == "yes" ]]; then
       ./bin/phpunit -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml
     fi
+  - sonar-scanner -Dproject.settings=Build/.sonar-project.properties
diff --git a/Build/.sonar-project.properties b/Build/.sonar-project.properties
new file mode 100644 (file)
index 0000000..ddd8e0d
--- /dev/null
@@ -0,0 +1,3 @@
+sonar.projectKey=typo3
+sonar.sources=typo3
+sonar.exclusions=**/Tests/**, **/Contrib/**
\ No newline at end of file