Skip to content

chore: remove SonarQube integration from CI#9

Merged
FreeYourSoul merged 5 commits intomasterfrom
copilot/fix-build-issue
Mar 31, 2026
Merged

chore: remove SonarQube integration from CI#9
FreeYourSoul merged 5 commits intomasterfrom
copilot/fix-build-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Removes all SonarQube integration from the repository after repeated attempts to make it work with Nix build-sandbox paths and the Nix gcc-wrapper failed.

Changes Made

  • Removed sonar-project.properties from the repository root
  • Removed the "Fix compile_commands.json paths" CI workflow step (Python script that patched compile_commands.json for SonarQube compatibility)
  • Removed the "SonarQube Scan" CI workflow step from .github/workflows/ci-linux.yml

The CI workflow now only runs the Nix build, test, coverage check, and Codacy coverage reporting steps.

…ox paths

Agent-Logs-Url: https://github.com/FreeYourSoul/FiL/sessions/a81298d6-0edc-475e-a3ee-f339b7d35aaa

Co-authored-by: FreeYourSoul <11722712+FreeYourSoul@users.noreply.github.com>
@FreeYourSoul
Copy link
Copy Markdown
Owner

@copilot I think you need to copy the file first before modifying it (permission denied)

…x store

Agent-Logs-Url: https://github.com/FreeYourSoul/FiL/sessions/7da58b15-a303-4073-bf7c-39a85ac7577e

Co-authored-by: FreeYourSoul <11722712+FreeYourSoul@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot I think you need to copy the file first before modifying it (permission denied)

Good catch. The result/ symlink points into the Nix store which is read-only (444 permissions), and cp was preserving those permissions, causing the Python write to fail. Fixed in f0fd63f by using cp --no-preserve=mode so the copied file gets normal writable permissions.

@FreeYourSoul
Copy link
Copy Markdown
Owner

@copilot Still not ok, the replace looks like to have worked though, but sonarqube is still not working

…gnizes compilation units

Agent-Logs-Url: https://github.com/FreeYourSoul/FiL/sessions/8341d592-39dd-478c-892e-cc15e4fea31a

Co-authored-by: FreeYourSoul <11722712+FreeYourSoul@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot Still not ok, the replace looks like to have worked though, but sonarqube is still not working

The source path replacement was working correctly, but the command field in compile_commands.json was using the Nix gcc-wrapper (/nix/store/.../gcc-wrapper-15.2.0/bin/g++), which is a shell script wrapper rather than a real compiler binary. SonarQube CFamily doesn't support it and marks all compilation units as "unsupported."

Fixed in 4356cd3: after replacing source paths, the script now also replaces any /nix/store/.../bin/<compiler> paths in the command field with the bare compiler name (e.g. g++), which resolves to the system compiler that SonarQube can recognize.

@FreeYourSoul
Copy link
Copy Markdown
Owner

@copilot still didn't work

…be CFamily

Agent-Logs-Url: https://github.com/FreeYourSoul/FiL/sessions/622b44d6-406f-4625-96a1-3a4ebc491e62

Co-authored-by: FreeYourSoul <11722712+FreeYourSoul@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot still didn't work

Looking at the latest CI logs, both the source-path and compiler-wrapper replacements were working correctly. The remaining issue was -std=gnu++26 in the command field — SonarQube CFamily 6.x only supports up to C++23 and classifies any compilation unit using an unrecognised standard as "unsupported".

Fixed in f2831e0: the script now also normalises the C++ standard flag — stripping the gnu extension prefix and capping the version at 23 (e.g. -std=gnu++26-std=c++23).

@FreeYourSoul
Copy link
Copy Markdown
Owner

I give up on using sonar, can you remove the code that is triggering sonar (the porperty file) etc.. ?

@FreeYourSoul
Copy link
Copy Markdown
Owner

@copilot I give up on using sonar, can you remove the code that is triggering sonar (the porperty file) etc.. ?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 31, 2026

@copilot I give up on using sonar, can you remove the code that is triggering sonar (the porperty file) etc.. ?

Done in e0f9454 — removed sonar-project.properties and deleted the "Fix compile_commands.json paths" and "SonarQube Scan" steps from the CI workflow.

@sonarqubecloud
Copy link
Copy Markdown

Copilot AI changed the title fix: detect Nix build-sandbox paths in compile_commands.json for SonarQube chore: remove SonarQube integration from CI Mar 31, 2026
@FreeYourSoul FreeYourSoul merged commit 415a819 into master Mar 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants