From 4e31edf07e1ec3b95b8a67d3c5664a059a2d7934 Mon Sep 17 00:00:00 2001 From: xx-TheDoctor-xx Date: Sat, 18 Apr 2020 09:34:16 +0100 Subject: [PATCH] Added sonar cloud --- .travis.yml | 11 ++++++++++- sonar-project.properties | 12 ++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 sonar-project.properties diff --git a/.travis.yml b/.travis.yml index 9c153e9..59794b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ dist: trusty script: - dotnet restore - dotnet build +script: + - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then bash ./travis/run_on_pull_requests; fi' + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./travis/run_on_non_pull_requests; fi' env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created @@ -22,4 +25,10 @@ addons: notification_email: guilhermesuicida123654@gmail.com build_command_prepend: "donet restore" build_command: "dotnet build" - branch_pattern: coverity_scan \ No newline at end of file + branch_pattern: coverity_scan + sonarcloud: + organization: "xx-thedoctor-xx" + token: "$TRAVIS_SONARCLOUD_TOKEN" + +script: + - sonar-scanner \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..ee3fca3 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,12 @@ +sonar.projectKey=xX-TheDoctor-Xx_PMF +sonar.organization=xx-thedoctor-xx + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=PMF +#sonar.projectVersion=1.0 + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file