zetilov-s
(Сергей Зетилов)
June 21, 2024, 11:40am
1
Template for a good new topic, formatted with Markdown :
ALM used GitHub
CI system not used
Scanner command used when applicable (private details masked)
Languages of the repository
Only if the SonarCloud project is public, the URL
And if you need help with pull request decoration, then the URL to the PR too
Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
Steps to reproduce
Potential workaround
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
We connected the repository and enabled automatic analysis. Our repository contains C/C++ code but it is not defined.
at the root of the default branch repository we put the configuration file .sonarcloud.properties
sonar.sources=src,HSFramework,HSModules,engine,libs,utils
sonar.sourceEncoding=UTF-8
sonar.exclusions=**/*.java,**/*.wav,**/base_mm/**,**/*.wav,**/*.png,**/*.xml
sonar.python.version=3.7
sonar.cfamily.reportingCppStandardOverride=c++17
what needs to be done for sonarcloud to detect and analyze C/C++ code in the repository during automatic analysis without CI-based?
Colin
(Colin)
June 21, 2024, 2:42pm
2
Hey there.
Can you take a look in your GitHub repo and show us what the Languages breakdown looks like?
This data tells us if any C
or C++
code exists.
zetilov-s
(Сергей Зетилов)
June 21, 2024, 3:16pm
3
Thanks. There are no languages on the github repository side, I will add them in .gitattributes and report the result
zetilov-s
(Сергей Зетилов)
June 24, 2024, 10:39am
4
We cannot configure language detection, since our repository size is more than 100,000 files and this is beyond the limits of linguist. About repository languages - GitHub Docs
Is there another way for sonarcloud to get the available languages of the repository?
Colin
(Colin)
June 24, 2024, 12:12pm
5
Not today. I’m not even sure we were aware of this limitation in this context (choosing which flavor of Automatic Analysis gets run, which itself is a very technical detail most users don’t have to worry about).
I’m going to flag this for attention. For now, you’ll have to switch to CI-based analysis (compilation database mode )
Hello @zetilov-s ,
Thanks for pointing out this limitation, we created a ticket in our backlog to overcome this limitation.
Colin
(Colin)
July 9, 2024, 2:24pm
13
And to round this out – in the meantime, CI-based analysis is the way to go.
1 Like