Hi,
Sorry. You said that to start with.
.
So here’s what’s interesting about your log:
2023-05-31T20:05:24.6448576Z INFO: SCM collecting changed files in the branch
2023-05-31T20:05:24.9994963Z INFO: SCM collecting changed files in the branch (done) | time=354ms
2023-05-31T20:05:25.0967727Z INFO: Indexing files...
2023-05-31T20:05:25.0968149Z INFO: Project configuration:
2023-05-31T20:05:25.0977714Z INFO: Excluded sources: **/build-wrapper-dump.json
2023-05-31T20:05:25.2449638Z INFO: 8 files indexed
2023-05-31T20:05:25.2457502Z INFO: 0 files ignored because of inclusion/exclusion patterns
2023-05-31T20:05:25.2461408Z INFO: 0 files ignored because of scm ignore settings
Analysis only finds 8 files of interest.
But it seems there are more than 8 files in the project:
2023-05-31T20:05:30.9245854Z INFO: Sensor gcov [cpp]
2023-05-31T20:05:30.9314104Z INFO: Parsing [coverage report for a single file?]
2023-05-31T20:05:30.9345164Z WARN: File not analysed by Sonar, so ignoring coverage: [the single file]
The Parsing... ignoring pattern happens 367 times, so there are apparently a lot more than 8 files in the project…?
Going back to the OP, I see that the source files are supposed to be in ns3_adapter/src/, but none of the paths reported for ignored files include that string. I suppose that’s why indexing only found 8 files. The question is whether this is expected on your side, and why you’ve submitted coverage reports for all those extraneous files.
Going back to the 8 files, it seems that most are unchanged:
2023-05-31T20:05:32.3380450Z INFO: Sensor CFamily [cpp]
2023-05-31T20:05:32.3947233Z INFO: CFamily plugin version: 6.45.0.62016
2023-05-31T20:05:32.3955620Z INFO: Using compile commands: /opt/carma/build/compile_commands.json
2023-05-31T20:05:32.3990434Z INFO: Available processors: 2
2023-05-31T20:05:32.4076140Z INFO: Using 2 threads for analysis.
2023-05-31T20:05:35.8130977Z INFO: Found empty cache on server
2023-05-31T20:05:36.3534895Z INFO: PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 0 (forceInclude=0,throughHeader=0)
2023-05-31T20:05:36.3538698Z INFO: Z3 refutation rate: 0 out of 0
2023-05-31T20:05:36.3538943Z INFO: SE: 0 out of 0
2023-05-31T20:05:36.3551827Z INFO: Subprocess(es) done in 542ms
2023-05-31T20:05:36.3593822Z INFO: 4/6 files marked as unchanged
2023-05-31T20:05:36.3603243Z INFO: 2/2 test files marked as unchanged
Back at the top of the log, we see that this is a short-lived branch analysis.
2023-05-31T20:05:24.1055613Z INFO: Branch name: fix/sonar, type: short-lived
I’ll be honest and say I’m a bit fuzzy on how short-lived branches are analyzed in SonarCloud. On the PR side, we only analyze changed files. I’m not sure whether short-lived branch analysis has been updated for that as well or not. But we certainly only report on changed files in short-lived branches.
So what that leaves us with is that at least 2 files that theoretically could have been reported on and were not.
I think now it’s time to ask: were you nodding along with all this^ or do we need to start with why only 8 files were indexed? And if you were nodding along, did you expect only changed files to be analyzed? And also, can you add sonar.verbose=true to your analysis properties & post the new log?
Tangentially, on the topic of your analysis properties:
-
sonar.scm.disabled=false - this is the default. no need to set it
-
sonar.scm.enabled=true - this isn’t a thing
-
sonar.scm.provider=git - if this isn’t picked up automatically, setting it explicitly won’t help
Ann