Open axel3rd opened 3 years ago
Argh, SonarCloud GitHub action seems not (now) support C/C++ analysis 😭 : https://github.com/SonarSource/sonarcloud-github-action#do-not-use-this-github-action-if-you-are-in-the-following-situations
This language requires build-wrapper usage, seems not been included into action. But perhaps can be done "manually" ... to investigate.
Wrapper URL download: http://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
@peio42 : A Makefile
on root where make
(as currently) / make clean
/ make test
would be more simple.
See "codeAnalysis" branch for that (which will evolve to run code analsysis) make => build test program & runs it make test => build test program make clean => remove object files
Please create a SonarCloud token and store it as secret (SONAR_TOKEN) in repo secrets
@peio42 In your hand 😁 : https://github.com/peio42/uvpp/runs/1473975983?check_suite_focus=true#step:7:10
@axel3rd : java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
Humm ... don't know why 😢. I would test if removing the "sub call of make" could produce a better result.
See https://community.sonarsource.com/t/the-build-wrapper-dump-json-file-was-found-but-0-c-c-objective-c-files-were-analyzed/15944, perhaps it is not supported, because compilation and analysis (in docker) are not done in the same environment.
But I can reproduce the problem locally ... so perhaps not in this case (even if it smells not good).
I can analyse the project locally but with:
Makefile
on root directorysonar.sources=.
So there is a understanding to have with subdirectories. Perhaps a problem is that uvpp
doesn't contain sources but only headers. Adding examples
as sources can perhaps be a solution.
I will provide some change (that works but perhaps not sustainable) to see if analyse with GitHub Action could be OK (because not supported officially).
see if analyse with GitHub Action could be OK (because not supported officially).
Really not supported https://github.com/peio42/uvpp/runs/1489280883?check_suite_focus=true#step:7:133 😢
Scanner inside container is definitively dead ... it execute Probing compiler: [/usr/lib/llvm-10/bin/clang, -x, c++, --std, c++17, -v, -dM, -E, -]
to have define info ... compiler is not inside container => 🖕.
I will try manually with scanner
I will try manually with scanner
@peio42 : It is ok 👍, now: https://sonarcloud.io/dashboard?branch=codeAnalysis&id=org.blutch%3Auvpp (branch sample ... when master
will be analysed it will be better)
TODO:
Makefile
because only make
in ci-tests.yml
seems not work
https://github.com/peio42/uvpp/blob/1cd98ffc66f598afd1c8665f4189ee07b838153d/Makefile#L12-L15
https://github.com/peio42/uvpp/blob/1cd98ffc66f598afd1c8665f4189ee07b838153d/.github/workflows/ci-tests.yml#L25I need to analyse why PullRequest decoration is not done (perhaps because all is done manually)
@peio42 : You should Enable summary comment in project settings: https://sonarcloud.io/project/settings?category=pull_request&id=org.blutch%3Auvpp
[image: image.png] It is by default...
Le sam. 5 déc. 2020 à 18:13, Alix Lourme notifications@github.com a écrit :
I need to analyse why PullRequest decoration is not done (perhaps because all is done manually)
@peio42 https://github.com/peio42 : You should Enable summary comment in project settings: https://sonarcloud.io/project/settings?category=pull_request&id=org.blutch%3Auvpp
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/peio42/uvpp/issues/3#issuecomment-739322663, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKVMZSIRBBOASRBTLKK2H3TSTJS4XANCNFSM4UGT7WJQ .
It is by default...
So perhaps to be complicated with scanner executed manually ... to see in the future
See: https://github.com/marketplace/actions/sonarcloud-scan
@peio42 : Please create on https://sonarcloud.io/
org.blutch:uvpp
SONAR_TOKEN
) in repo secrets