regis
(Regis St-Gelais)
June 8, 2021, 6:49pm
1
I want to scan my Swift project and exclude Objective-C scan.
I have a Bitbucket pipeline message that tells me to set these properties to prevent scanning
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
But I can’t find where to set them in SonarCloud.
JolyLoic
(Loïc Joly)
June 8, 2021, 9:24pm
2
You can set them in your sonar-project.properties
file. You can also set them in the UI:
Administration General settings Languages C / C++ / Objective C
Hope this helps!
1 Like
regis
(Regis St-Gelais)
June 9, 2021, 12:08pm
3
regis
(Regis St-Gelais)
June 9, 2021, 12:10pm
4
my yml file is like this:
clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly
definitions:
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
steps:
- step: &build-test-sonarcloud
name: Build, test and analyze on SonarCloud
caches:
- sonar
script:
- pipe: sonarsource/sonarcloud-scan:1.2.1
- step: &check-quality-gate-sonarcloud
name: Check the Quality Gate on SonarCloud
script:
- pipe: sonarsource/sonarcloud-quality-gate:0.1.4
pipelines: # More info here: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html
branches:
master:
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
pull-requests:
‘**’:
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
master:
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
pull-requests:
‘**’:
- step: *build-test-sonarcloud
- step: *check-quality-gate-sonarcloud
regis
(Regis St-Gelais)
June 9, 2021, 3:48pm
5
It was not working because I simply deleted all the suffix. I also needed to add suffix with the minus sign -
Tks for your help
JolyLoic
(Loïc Joly)
June 9, 2021, 9:20pm
6
Thank you! Glad to know it finally worked for you!
system
(system)
Closed
June 16, 2021, 9:21pm
7
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.