Skip to content

Commit

Permalink
cxx 1.3.3
Browse files Browse the repository at this point in the history
- update SQ and scanner versions
- fix bug in Visual Studio coverage scanner
- test with 8.x versions
  • Loading branch information
guwirth committed Jun 7, 2020
1 parent 6dd6f74 commit 6e5cb2d
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 27 deletions.
26 changes: 20 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,29 @@ jdk:
- openjdk11
env:
- SONARLABEL=sonarqube-6.7.7 SONARAPI=SqApi67
- SONARLABEL=sonarqube-7.9.2 SONARAPI=SqApi79
- SONARLABEL=sonarqube-7.9.3 SONARAPI=SqApi79
- SONARLABEL=sonarqube-8.0 SONARAPI=SqApi79
- SONARLABEL=sonarqube-8.1.0.31237 SONARAPI=SqApi79
- SONARLABEL=sonarqube-8.2.0.32929 SONARAPI=SqApi79

matrix:
exclude:
- jdk: oraclejdk8
env: SONARLABEL=sonarqube-7.9.2 SONARAPI=SqApi79
env: SONARLABEL=sonarqube-7.9.3 SONARAPI=SqApi79
- jdk: oraclejdk8
env: SONARLABEL=sonarqube-8.0 SONARAPI=SqApi79
- jdk: oraclejdk8
env: SONARLABEL=sonarqube-8.1.0.31237 SONARAPI=SqApi79
- jdk: oraclejdk8
env: SONARLABEL=sonarqube-8.2.0.32929 SONARAPI=SqApi79
allow_failures:
- env: SONARLABEL=sonarqube-8.0 SONARAPI=SqApi79
- env: SONARLABEL=sonarqube-8.1.0.31237 SONARAPI=SqApi79
- env: SONARLABEL=sonarqube-8.2.0.32929 SONARAPI=SqApi79

branches:
only:
- master
- /^(?i:master).*$/

# shorten the VM hostname with the new workaround
# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
Expand Down Expand Up @@ -51,8 +65,8 @@ install:
- pushd /tmp
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonarqube/$SONARLABEL.zip
- unzip -qq $SONARLABEL.zip
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873.zip
- unzip -qq sonar-scanner-cli-4.2.0.1873.zip
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip
- unzip -qq sonar-scanner-cli-4.3.0.2102.zip
- wget -nv --timeout=10 https://github.com/htacg/tidy-html5/archive/5.6.0.zip --output-document=tidy-html5.zip
- unzip -qq tidy-html5.zip
- pushd tidy-html5-5.6.0/build/cmake/
Expand All @@ -70,7 +84,7 @@ script:
- mvn install -B -e -V -DskipTests=true
- mvn test -B -e -V
- bash cxx-sensors/src/tools/check_rules.sh
- RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-4.2.0.1873/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture --tags=$SONARAPI
- RAILS_ENV=production PATH=$PATH:/tmp/sonar-scanner-4.3.0.2102/bin TestDataFolder=~/build/SonarOpenCommunity/sonar-cxx/integration-tests/testdata behave --no-capture --tags=$SONARAPI

after_failure:
- cat $SONARHOME/logs/sonar.log
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install:
if (!(Test-Path -Path "C:\sonar-scanner" )) {
(new-object System.Net.WebClient).DownloadFile(
'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873.zip',
'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip',
'C:\sonar-scanner-dist.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonar-scanner-dist.zip", "C:\sonar-scanner")
Expand All @@ -62,7 +62,7 @@ install:
$env:VCVARS_PLATFORM="amd64"
$env:LANG_PLATFORM="-x64"
}
- cmd: SET PATH=C:\maven\apache-maven-3.5.4\bin;%JAVA_HOME%\bin;C:\sonar-scanner\sonar-scanner-4.2.0.1873\bin;%PATH%
- cmd: SET PATH=C:\maven\apache-maven-3.5.4\bin;%JAVA_HOME%\bin;C:\sonar-scanner\sonar-scanner-4.3.0.2102\bin;%PATH%
- cmd: SET M2_HOME=C:\maven\apache-maven-3.5.4
- cmd: SET MAVEN_HOME=C:\maven\apache-maven-3.5.4
- cmd: SET SONARHOME=C:\sonarqube\sonarqube-6.7.7
Expand All @@ -82,7 +82,7 @@ build_script:
- C:\Python27\Scripts\pip.exe install requests
- C:\Python27\Scripts\pip.exe install behave
- C:\Python27\Scripts\pip.exe install colorama
- mvn versions:set -DnewVersion=1.3.2.%APPVEYOR_BUILD_NUMBER%
- mvn versions:set -DnewVersion=1.3.3.%APPVEYOR_BUILD_NUMBER%
- mvn clean install -B -e -V
- IF "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" (mvn sonar:sonar -B -e -V -Dsonar.organization=sonaropencommunity -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=%sonarcloudtoken%)
- REM IF NOT "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" (mvn sonar:sonar -B -e -X -V -Dsonar.verbose=true -Dsonar.pullrequest.base=master -Dsonar.pullrequest.branch=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH% -Dsonar.pullrequest.key=%APPVEYOR_PULL_REQUEST_NUMBER% -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.repository=%APPVEYOR_PROJECT_SLUG%)
Expand Down
4 changes: 2 additions & 2 deletions cxx-checks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
</parent>

<artifactId>cxx-checks</artifactId>
Expand All @@ -15,7 +15,7 @@
<properties>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
2 changes: 1 addition & 1 deletion cxx-sensors/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
</parent>

<artifactId>cxx-sensors</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ private static void collectSourceFileMeasures(SMInputCursor sourceFiles, Map<Str
while (sourceFile.getNext() != null) {
String id = sourceFile.getAttrValue("id");
CoverageMeasures builder = coverageData.remove(id);
if (builder == null) {
builder = CoverageMeasures.create();
}
// replace id with path
coverageData.put(sourceFile.getAttrValue("path"), builder);
}
Expand Down
2 changes: 1 addition & 1 deletion cxx-squid/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
</parent>

<artifactId>cxx-squid</artifactId>
Expand Down
14 changes: 7 additions & 7 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
</parent>

<artifactId>integration-tests</artifactId>
Expand All @@ -19,9 +19,9 @@
</properties>

<dependencies>
<!-- set dependencies to aggregate coverage results -->

<!-- set dependencies to aggregate coverage results -->

<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cxx-checks</artifactId>
Expand All @@ -31,7 +31,7 @@
<groupId>${project.groupId}</groupId>
<artifactId>cxx-sensors</artifactId>
<version>${project.version}</version>
</dependency>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>cxx-squid</artifactId>
Expand All @@ -47,7 +47,7 @@
<artifactId>sonar-cxx-plugin</artifactId>
<version>${project.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-jvm-deps -->

<!-- https://mvnrepository.com/artifact/io.cucumber/gherkin -->
Expand Down Expand Up @@ -166,7 +166,7 @@
</execution>
</executions>
</plugin>
<plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Cxx</name>
Expand Down Expand Up @@ -379,7 +379,7 @@
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
</dependencies>
</dependencies>
</dependencyManagement>
<build>
<!-- To define the plugin version in your parent POM -->
Expand Down Expand Up @@ -414,7 +414,7 @@
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
</plugin>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions sonar-c-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
</parent>


Expand All @@ -23,7 +23,7 @@
<sonar.artifact.path>target/${project.artifactId}-${project.version}.jar</sonar.artifact.path>
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
<dependency>
<groupId>org.sonarsource.sonarqube</groupId>
Expand Down
2 changes: 1 addition & 1 deletion sonar-cxx-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
</parent>

<artifactId>sonar-cxx-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sslr-cxx-toolkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
<artifactId>cxx</artifactId>
<version>1.3.2-SNAPSHOT</version>
<version>1.3.3-SNAPSHOT</version>
</parent>

<artifactId>sslr-cxx-toolkit</artifactId>
Expand Down

0 comments on commit 6e5cb2d

Please sign in to comment.