Skip to content

ci: match the files under tests/ in the Sonar exclusion - #76

Merged
somethingwithproof merged 1 commit into
mainfrom
fix/sonar-exclude-glob
Nov 15, 2026
Merged

somethingwithproof merged 1 commit into
mainfrom
fix/sonar-exclude-glob

Conversation

@somethingwithproof

@somethingwithproof somethingwithproof commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Follow-up to #75. sonar.exclusions=tests did not leave anything out. The SonarQube Cloud analysis of 0e7f33d still lists every tests/ directory: tests/bin, tests/Unit, tests/Integration and the rest.

sonar.exclusions matches file paths, so the pattern has to be tests/** to match the files under tests/. sonar.sources still takes a plain path.

Testing

  • No code changes.
  • After this merges, the main-branch analysis should list no tests/ components. I'll check with api/components/tree.

Summary by CodeRabbit

  • Chores
    • Clarified how code analysis interprets source paths and test-file patterns.
    • Updated test exclusions to target files beneath the test directory, rather than the directory path itself. This refines which files are omitted from analysis without changing application functionality.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The SonarCloud configuration comments now distinguish plain source paths from exclusion globs. The test exclusion changes from tests to tests/**. The source setting remains sonar.sources=..

Changes: SonarCloud configuration

Layer / File(s) Summary
Test file exclusion
.sonarcloud.properties
The exclusion changes from tests to tests/**. The comments clarify that sonar.sources uses plain paths and that the test exclusion uses a glob.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: Minimal · up to 543fc

This only changes which files SonarCloud analyzes by excluding everything under tests/. It has no runtime or production impact and is trivially reversible, so it is safe to merge.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Description check Inconclusive The description covers the problem, the fix, and the testing plan. It explains why tests was not enough and why sonar.sources stays a plain path. The template also has Issue, Requirements affected, Ve… Add an Issue line that uses Closes #NN or Refs #NN; the description only says Follow-up to #75. Add a Requirements affected entry, or write "none". Replace the Testing section with the Verification section and state the tool version used fo…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title names the change: the Sonar exclusion now matches files under tests/ (tests/**). It is specific and matches the summary, the description, and the objectives. It is a conventional ci: commit-…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: the Sonar exclusion now matches files under tests/ (tests/**). It is specific and matches the summary, the description, and the objectives. It is a conventional ci: commit-style title that a teammate scanning history can understand.

Full details: Description check

Explanation

The description covers the problem, the fix, and the testing plan. It explains why tests was not enough and why sonar.sources stays a plain path. The template also has Issue, Requirements affected, Verification, and Checklist sections. The description references #75 only as a follow-up and has no Closes or Refs line. It has no Requirements affected entry and no Verification entry with versions. It also has no Checklist. The Summary and Testing sections are complete for a config-only change.

Resolution

Add an Issue line that uses Closes #NN or Refs #NN; the description only says Follow-up to #75. Add a Requirements affected entry, or write "none". Replace the Testing section with the Verification section and state the tool version used for the SonarQube Cloud check. Add the Checklist from the template, including the sign-off confirmation (git commit -s), and mark the docs items as applicable or not applicable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit reads the paths with care
And checks the test files tucked in there
A glob now marks the files to skip
The source path stays on its trip
Then hops away through moonlit air

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c536627b-c193-459a-a86a-ffcbf9d2b99e
Commits

Reviewing files that changed from the base of the PR and between 0e7f33d and 543fc02.

Files selected for processing: 1

  • .sonarcloud.properties

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@sonarqubecloud

Copy link
Copy Markdown

@gitar-bot

gitar-bot Bot commented Nov 15, 2026

Copy link
Copy Markdown

Important

You are using the Gitar free plan. Upgrade to unlock code review, CI analysis, auto-apply, custom automations, and more.

Gitar

@somethingwithproof
somethingwithproof merged commit e243d38 into main Nov 15, 2026
18 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.

1 participant