Compare commits

...
Author SHA1 Message Date
poli0981andClaude Opus 5.5 9e1e7e4b21 build(sonar): SonarCloud analyses only FrameLedger's own code - .sonarcloud.properties and the triage of the 341 issues in 13_CI_CD (beta.24 PR-1)
Automatic Analysis reads one file, from the default branch: it now excludes the
vendored SDK headers (51 headers, 66k lines, classed C), generated files, the
vendor stubs, tests/fixtures, licence texts, docs/vendor-exports.json and the
SQLite migrations, and reports the native code against C++20.

docs/13_CI_CD.md gains §SonarCloud: the mode, what the file excludes and why,
what Automatic Analysis cannot do (sonar.issue.ignore is UI-only), and the
triage of the 2026-09-28 analysis (372389c): rules broken by design (S8417,
S6640, S3869) to Accept, false positives (S6232, S2077, S935, S3519, S836) with
the comment to paste, S5813 per site, and the 35 the next PR fixes.

Owner decision D67 (2026-10-19).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:50:19 +07:00
3 changed files with 74 additions and 0 deletions

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
# SonarCloud Automatic Analysis — read from the default branch (docs/13_CI_CD.md §SonarCloud, decision D67).
# Automatic Analysis reads only this file: sonar.issue.ignore.* is not supported here, so the rules accepted by design
# are recorded in docs/13_CI_CD.md and marked by the owner in SonarCloud's own UI.
# What is not FrameLedger's code, or not code at all:
# - src/native/third_party: the vendored SDK headers (NVAPI, Streamline, FidelityFX, Vulkan-Headers) — 51 headers,
# 66 thousand lines, consumed unmodified (each folder's README says so and license-check holds it).
# - Strings.Designer.cs: generated by tools/resx-gen.ps1.
# - dxr_raygen_dxil.h: a compiled shader as a byte array, generated.
# - vendor-stubs: test fixtures that carry the vendors' export names and signatures on purpose.
# - tests/fixtures: the detection corpus (empty marker binaries and expected JSON).
# - legal/licenses, docs/vendor-exports.json: licence texts and a generated export list.
# - Migrations: SQLite scripts, which a SQL analyser reads as another dialect.
sonar.exclusions=src/native/third_party/**,**/Strings.Designer.cs,src/native/tools/hook-harness/dxr_raygen_dxil.h,src/native/tools/vendor-stubs/**,tests/fixtures/**,legal/licenses/**,docs/vendor-exports.json,src/FrameLedger.Infrastructure/Persistence/Migrations/**
# Tests repeat their arrange steps on purpose; duplication there is not a defect.
sonar.cpd.exclusions=tests/**,src/native/tests/**
# The native code is C++20 (src/native/CMakeLists.txt); report against it, not a later standard.
sonar.cfamily.reportingCppStandardOverride=c++20
sonar.sourceEncoding=UTF-8
+8
View File
@@ -28,6 +28,14 @@ numeric core and does not move; the heading is the full version — corrected 20
## [Unreleased]
### Changed
- **SonarCloud analyses only FrameLedger's own code** (developers only; owner request 2026-10-19, decision D67). A
`.sonarcloud.properties` at the root keeps the vendored SDK headers, generated files, test fixtures, licence texts and
the SQLite migrations out of the analysis and reports the native code against C++20; `docs/13_CI_CD.md` §SonarCloud
records the triage of the 341 issues the last analysis left — the rules this project breaks by design and why, the
false positives, and the ones the next change fixes — with the steps to mark them in SonarCloud.
## [0.1.0-beta.23] - 2026-10-14
**The twenty-third pre-release: a game's artwork on its page, in a band that takes the picture's colour, and pages
+44
View File
@@ -222,6 +222,50 @@ FrameLedger uses the **`poli0981/.github` ops repo** where its templates fit, an
- `permissions: contents: write` — the repository's default workflow token is read-only (read from the API,
2026-10-07), and pushing to the wiki repository needs write.
## SonarCloud — Automatic Analysis, no workflow (beta.24, owner decision D67)
The project `poli0981_frameledger` is analysed by SonarCloud's GitHub app in **Automatic Analysis** mode: on every
push to `main` and on every pull request, with no workflow in this repository and no logs published. Its check on a
pull request (*SonarCloud Code Analysis*) is advisory — it is not a required status.
**What it reads is set by `.sonarcloud.properties`** at the root, the only file Automatic Analysis reads, from the
default branch. It excludes what is not FrameLedger's code or not code: the vendored SDK headers under
`src/native/third_party/` (51 headers, 66 thousand lines — before this file they were 41.7 thousand of the project's
94 thousand counted lines, classed C), the generated `Strings.Designer.cs` and `dxr_raygen_dxil.h`, the vendor stubs
(fixtures that carry the vendors' export names on purpose), `tests/fixtures/`, the licence texts, the generated
`docs/vendor-exports.json` and the SQLite migrations (a SQL analyser reads them as another dialect). It reports C++
against C++20, the standard `src/native/CMakeLists.txt` sets. `build/`, `bin/`, `obj/` and `presentmon/` are
git-ignored and never reach it.
**What it cannot do.** `sonar.issue.ignore.*` is not read by Automatic Analysis, so a rule this project breaks by
design is recorded here and marked in SonarCloud's own UI — by the owner, who holds the account. A CI-based scan (the
only way to import coverage or analyse one build variant of the C++) would mean turning Automatic Analysis off, a
`SONAR_TOKEN` secret, OpenCover output beside today's Cobertura and a full-depth checkout; it is not done.
**The triage of 2026-10-19** — the analysis of `main` at `372389c` (2026-09-28; nothing had been analysed since),
341 open issues, none resolved. Rules broken by design are *Accept*ed and false positives marked as such, each with
the comment below; the rest are fixed in the same train (beta.24 PR-2).
| Rule | Issues | Verdict | Comment for the UI |
|---|---|---|---|
| `cpp:S8417` atomics should be sequentially consistent | 225 | **Accept** — by design | The SPSC ring and the hook counters use explicit acquire/release and relaxed orders on purpose (`07_IPC`); sequential consistency would add fences on the per-present path. |
| `csharpsquid:S6640` unsafe code blocks | 31 | **Accept** — by design | Interop with the native layer and the shared-memory mirror, confined to `Infrastructure` and `Shared` (CLAUDE.md: the native layer is reachable only through `Infrastructure`). |
| `cpp:S6232` union type-punning | 24 | **False positive** | `LARGE_INTEGER.QuadPart` is how the Windows API returns the value. |
| `cpp:S5813` bounds when computing string length | 19 | **Accept** where the string is a literal or the API guarantees its terminator; fixed where a buffer bound is at hand | Each site is listed in beta.24 PR-2. |
| `csharpsquid:S2077` dynamic SQL | 3 | **False positive** | A `PRAGMA` argument cannot be bound; the values are an `int` and closed sets of constants (`wal_checkpoint` mode, the tri-state column), never user text. |
| `cpp:S935` `FlGetBuildId` returns no value | 1 | **False positive** | `FL_BUILD_ID` is defined by the build (`12_BUILD` §Version); the analysis compiles without it. |
| `cpp:S3519` out-of-bounds `memcpy` | 1 | **False positive** | `fl_patch_check.h` reads the prologue of a function this DLL hooked, under SEH, by design (`17_HOOK_ENGINE` §Unhooking). |
| `cpp:S836` garbage value returned | 1 | **False positive** | `hook-harness`'s `VtableOf` reads the vtable of a COM object it created itself. |
| `csharpsquid:S3869` `DangerousGetHandle` | 1 | **Accept** | `ParentDump` passes the dump file's handle to `MiniDumpWriteDump` inside the `using` that owns the stream, on the same thread, so it cannot be released during the call; CsWin32 generates no `SafeHandle` overload here (`NativeMethods.json`: `useSafeHandles: false`). |
| `cpp:S1669`, `cpp:S6191`, `csharpsquid:S4036`, `githubactions:S7637`, `csharpsquid:S2190`, `S3427`, `S8949` | 35 | **Fixed** in beta.24 PR-2 — 5 of the 23 `S1669` were in the vendored Vulkan headers and leave with the exclusions | — |
**The owner's steps** after the next analysis of `main`: for each rule above, open
`https://sonarcloud.io/project/issues?id=poli0981_frameledger&resolved=false&rules=<rule>`, select all, *Bulk change*,
choose *Accept* or *False positive* and paste the comment. Optionally, *Administration ▸ General Settings ▸ Analysis
Scope ▸ Ignore issues on multiple criteria*: `cpp:S8417` and `cpp:S6232` on `src/native/**/*`, `csharpsquid:S6640`
on `src/FrameLedger.Infrastructure/**/*` and `src/FrameLedger.Shared/**/*`, so new instances of the by-design rules
stop reappearing on pull requests.
## Dependabot (`.github/dependabot.yml`)
```yaml