Skip to content

Commit 6e5cb2d

Browse files
committed
cxx 1.3.3
- update SQ and scanner versions - fix bug in Visual Studio coverage scanner - test with 8.x versions
1 parent 6dd6f74 commit 6e5cb2d

File tree

11 files changed

+44
-27
lines changed

11 files changed

+44
-27
lines changed

.travis.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,29 @@ jdk:
88
- openjdk11
99
env:
1010
- SONARLABEL=sonarqube-6.7.7 SONARAPI=SqApi67
11-
- SONARLABEL=sonarqube-7.9.2 SONARAPI=SqApi79
11+
- SONARLABEL=sonarqube-7.9.3 SONARAPI=SqApi79
12+
- SONARLABEL=sonarqube-8.0 SONARAPI=SqApi79
13+
- SONARLABEL=sonarqube-8.1.0.31237 SONARAPI=SqApi79
14+
- SONARLABEL=sonarqube-8.2.0.32929 SONARAPI=SqApi79
15+
1216
matrix:
1317
exclude:
1418
- jdk: oraclejdk8
15-
env: SONARLABEL=sonarqube-7.9.2 SONARAPI=SqApi79
19+
env: SONARLABEL=sonarqube-7.9.3 SONARAPI=SqApi79
20+
- jdk: oraclejdk8
21+
env: SONARLABEL=sonarqube-8.0 SONARAPI=SqApi79
22+
- jdk: oraclejdk8
23+
env: SONARLABEL=sonarqube-8.1.0.31237 SONARAPI=SqApi79
24+
- jdk: oraclejdk8
25+
env: SONARLABEL=sonarqube-8.2.0.32929 SONARAPI=SqApi79
26+
allow_failures:
27+
- env: SONARLABEL=sonarqube-8.0 SONARAPI=SqApi79
28+
- env: SONARLABEL=sonarqube-8.1.0.31237 SONARAPI=SqApi79
29+
- env: SONARLABEL=sonarqube-8.2.0.32929 SONARAPI=SqApi79
1630

1731
branches:
1832
only:
19-
- master
33+
- /^(?i:master).*$/
2034

2135
# shorten the VM hostname with the new workaround
2236
# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
@@ -51,8 +65,8 @@ install:
5165
- pushd /tmp
5266
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonarqube/$SONARLABEL.zip
5367
- unzip -qq $SONARLABEL.zip
54-
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873.zip
55-
- unzip -qq sonar-scanner-cli-4.2.0.1873.zip
68+
- wget -nv --timeout=10 https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip
69+
- unzip -qq sonar-scanner-cli-4.3.0.2102.zip
5670
- wget -nv --timeout=10 https://github.com/htacg/tidy-html5/archive/5.6.0.zip --output-document=tidy-html5.zip
5771
- unzip -qq tidy-html5.zip
5872
- pushd tidy-html5-5.6.0/build/cmake/
@@ -70,7 +84,7 @@ script:
7084
- mvn install -B -e -V -DskipTests=true
7185
- mvn test -B -e -V
7286
- bash cxx-sensors/src/tools/check_rules.sh
73-
- 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
87+
- 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
7488

7589
after_failure:
7690
- cat $SONARHOME/logs/sonar.log

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ install:
3636
3737
if (!(Test-Path -Path "C:\sonar-scanner" )) {
3838
(new-object System.Net.WebClient).DownloadFile(
39-
'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873.zip',
39+
'https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.3.0.2102.zip',
4040
'C:\sonar-scanner-dist.zip'
4141
)
4242
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\sonar-scanner-dist.zip", "C:\sonar-scanner")
@@ -62,7 +62,7 @@ install:
6262
$env:VCVARS_PLATFORM="amd64"
6363
$env:LANG_PLATFORM="-x64"
6464
}
65-
- 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%
65+
- 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%
6666
- cmd: SET M2_HOME=C:\maven\apache-maven-3.5.4
6767
- cmd: SET MAVEN_HOME=C:\maven\apache-maven-3.5.4
6868
- cmd: SET SONARHOME=C:\sonarqube\sonarqube-6.7.7
@@ -82,7 +82,7 @@ build_script:
8282
- C:\Python27\Scripts\pip.exe install requests
8383
- C:\Python27\Scripts\pip.exe install behave
8484
- C:\Python27\Scripts\pip.exe install colorama
85-
- mvn versions:set -DnewVersion=1.3.2.%APPVEYOR_BUILD_NUMBER%
85+
- mvn versions:set -DnewVersion=1.3.3.%APPVEYOR_BUILD_NUMBER%
8686
- mvn clean install -B -e -V
8787
- IF "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" (mvn sonar:sonar -B -e -V -Dsonar.organization=sonaropencommunity -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=%sonarcloudtoken%)
8888
- 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%)

cxx-checks/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
77
<artifactId>cxx</artifactId>
8-
<version>1.3.2-SNAPSHOT</version>
8+
<version>1.3.3-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>cxx-checks</artifactId>
@@ -15,7 +15,7 @@
1515
<properties>
1616
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
1717
</properties>
18-
18+
1919
<dependencies>
2020
<dependency>
2121
<groupId>${project.groupId}</groupId>

cxx-sensors/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
77
<artifactId>cxx</artifactId>
8-
<version>1.3.2-SNAPSHOT</version>
8+
<version>1.3.3-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>cxx-sensors</artifactId>

cxx-sensors/src/main/java/org/sonar/cxx/sensors/coverage/VisualStudioParser.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ private static void collectSourceFileMeasures(SMInputCursor sourceFiles, Map<Str
6565
while (sourceFile.getNext() != null) {
6666
String id = sourceFile.getAttrValue("id");
6767
CoverageMeasures builder = coverageData.remove(id);
68+
if (builder == null) {
69+
builder = CoverageMeasures.create();
70+
}
6871
// replace id with path
6972
coverageData.put(sourceFile.getAttrValue("path"), builder);
7073
}

cxx-squid/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
77
<artifactId>cxx</artifactId>
8-
<version>1.3.2-SNAPSHOT</version>
8+
<version>1.3.3-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>cxx-squid</artifactId>

integration-tests/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<parent>
44
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
55
<artifactId>cxx</artifactId>
6-
<version>1.3.2-SNAPSHOT</version>
6+
<version>1.3.3-SNAPSHOT</version>
77
</parent>
88

99
<artifactId>integration-tests</artifactId>
@@ -19,9 +19,9 @@
1919
</properties>
2020

2121
<dependencies>
22-
23-
<!-- set dependencies to aggregate coverage results -->
24-
22+
23+
<!-- set dependencies to aggregate coverage results -->
24+
2525
<dependency>
2626
<groupId>${project.groupId}</groupId>
2727
<artifactId>cxx-checks</artifactId>
@@ -31,7 +31,7 @@
3131
<groupId>${project.groupId}</groupId>
3232
<artifactId>cxx-sensors</artifactId>
3333
<version>${project.version}</version>
34-
</dependency>
34+
</dependency>
3535
<dependency>
3636
<groupId>${project.groupId}</groupId>
3737
<artifactId>cxx-squid</artifactId>
@@ -47,7 +47,7 @@
4747
<artifactId>sonar-cxx-plugin</artifactId>
4848
<version>${project.version}</version>
4949
</dependency>
50-
50+
5151
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-jvm-deps -->
5252

5353
<!-- https://mvnrepository.com/artifact/io.cucumber/gherkin -->
@@ -166,7 +166,7 @@
166166
</execution>
167167
</executions>
168168
</plugin>
169-
<plugin>
169+
<plugin>
170170
<groupId>org.jacoco</groupId>
171171
<artifactId>jacoco-maven-plugin</artifactId>
172172
<executions>

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
1414
<artifactId>cxx</artifactId>
15-
<version>1.3.2-SNAPSHOT</version>
15+
<version>1.3.3-SNAPSHOT</version>
1616
<packaging>pom</packaging>
1717

1818
<name>Cxx</name>
@@ -379,7 +379,7 @@
379379
<artifactId>guava</artifactId>
380380
<version>19.0</version>
381381
</dependency>
382-
</dependencies>
382+
</dependencies>
383383
</dependencyManagement>
384384
<build>
385385
<!-- To define the plugin version in your parent POM -->
@@ -414,7 +414,7 @@
414414
<groupId>com.mycila</groupId>
415415
<artifactId>license-maven-plugin</artifactId>
416416
<version>3.0</version>
417-
</plugin>
417+
</plugin>
418418
<plugin>
419419
<groupId>org.apache.maven.plugins</groupId>
420420
<artifactId>maven-compiler-plugin</artifactId>

sonar-c-plugin/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
77
<artifactId>cxx</artifactId>
8-
<version>1.3.2-SNAPSHOT</version>
8+
<version>1.3.3-SNAPSHOT</version>
99
</parent>
1010

1111

@@ -23,7 +23,7 @@
2323
<sonar.artifact.path>target/${project.artifactId}-${project.version}.jar</sonar.artifact.path>
2424
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
2525
</properties>
26-
26+
2727
<dependencies>
2828
<dependency>
2929
<groupId>org.sonarsource.sonarqube</groupId>

sonar-cxx-plugin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.sonarsource.sonarqube-plugins.cxx</groupId>
77
<artifactId>cxx</artifactId>
8-
<version>1.3.2-SNAPSHOT</version>
8+
<version>1.3.3-SNAPSHOT</version>
99
</parent>
1010

1111
<artifactId>sonar-cxx-plugin</artifactId>

0 commit comments

Comments
 (0)