Skip to content

ci: run a SonarQube scan on pushes to main - #5435

Merged
aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:sonarqube-first-scan
Nov 1, 2026
Merged

aaltat merged 1 commit into
MarketSquare:mainfrom
aaltat:sonarqube-first-scan

Conversation

@aaltat

@aaltat aaltat commented Nov 1, 2026

Copy link
Copy Markdown
Member

Closes #5427

Summary

push to main
  sonarqube job (not in publish_nightly's needs)
    install Node and Python deps, inv protobuf
    robocop check atest                                 -> robocop_sonar_qube.json
    ruff check Browser browser_batteries atest          -> ruff.json
    mypy Browser browser_batteries atest/library        -> mypy.txt
    if SONAR_TOKEN is set: sonarqube-scan-action

Differences from the properties in #5418:

-sonar.organization=marketsquare
+sonar.organization=marketsquare-1
-sonar.sources=Browser,node/playwright-wrapper,atest
+sonar.sources=Browser,browser_batteries,node/playwright-wrapper,atest,.github
  • marketsquare-1 is the organization that owns the project on SonarQube Cloud.
  • .github is needed for GitHub Actions findings.
  • browser_batteries is part of the library. mypy also needs it to resolve an import.
  • The reports cover more than inv lint: ruff includes atest, and mypy includes atest/library. utest is left out of mypy because it makes mypy exit 2.

Evidence

  • Before: no CI analysis. The existing analyses come from Automatic Analysis, which is now off, and they carry no linter findings.
    After: a local SonarQube Community Build scan of a clean checkout imported every finding, and the .github YAML files were indexed.
Source Findings imported
Robocop 268
ruff 70
mypy 22

That scan ran before browser_batteries was added. Ruff was rerun with it and still reports 70 findings, none of them in browser_batteries.

Not proven yet:

  • The job itself has not run, because it only runs on pushes to main. actionlint passes.
  • GitHub Actions findings. Community Build has no rules for them. Automatic Analysis reported 114 on Cloud.
  • The dashboard criterion can only be checked after the first run on main.

Merge Danger

Door: two-way

Reverting the commit removes the job. Analyses already sent to SonarQube Cloud stay in its history.

Blast Radius: CI-only

The job is advisory, and a failure here cannot hold back the nightly. A failure would still mark the main run red. The dashboard gains about 360 linter findings, and the 268 from Robocop are new because inv lint-robot only formats.

🤖 Generated with Claude Code

Generates Robocop, ruff and mypy reports for import alongside native
analysis. The scan is skipped when SONAR_TOKEN is empty and the job stays
out of publish_nightly's needs, so it stays advisory.

The report formats were checked with a local SonarQube Community Build
scan of a clean checkout: all 268 Robocop, 70 ruff and 22 mypy findings
imported. The organization is marketsquare-1, which owns the project on
SonarQube Cloud. .github is a source so that workflows are analysed.

Refs MarketSquare#5427

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aaltat
aaltat merged commit 5b276bd into MarketSquare:main Nov 1, 2026
31 checks passed
@aaltat
aaltat deleted the sonarqube-first-scan branch November 1, 2026 21:22
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.

First SonarQube scan on main

1 participant