Skip to content

Treat Qodana findings as errors, and fix the one it reports - #20

Merged
RefuX merged 1 commit into
mainfrom
ci/qodana-warnings-as-errors
Oct 2, 2026
Merged

RefuX merged 1 commit into
mainfrom
ci/qodana-warnings-as-errors

Conversation

@RefuX

@RefuX RefuX commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Makes Qodana findings fail the build, and fixes the only one it reports.

  • Fix: IGlobalSession.pinDownstreamCompilersToPayload called equals on a field that held a MemorySegment.NULL sentinel, which Qodana's data-flow analysis flagged as a possible NPE. The field now holds null for "no payload directory" and the method null-checks it.
  • Gate: qodana.yaml adds failureConditions.severityThresholds.any: 0, so any finding fails the Qodana job instead of leaving a neutral check. PR and push runs only analyse changed files, so this gates new findings; a dispatched run covers everything.

A full scan of main (run 36986040675) found this one problem and nothing else. :slang:test 43/43 locally against the 2026.19 macos-aarch64 payload. This PR's Qodana run is the first with the gate on.

🤖 Generated with Claude Code

A full scan of main (dispatched run 36986040675; the CLI ran with no diff
range) reports one problem in the whole hand-written codebase:
IGlobalSession.pinDownstreamCompilersToPayload called equals on
DownstreamPath.SEGMENT, which the data-flow analysis cannot prove non-null
(it held MemorySegment.NULL as a "no payload" sentinel via Optional.orElse).
The field now holds null for that case and the method null-checks it, which
says the same thing without the sentinel.

qodana.yaml gains a quality gate (failureConditions.severityThresholds.any: 0),
so any finding fails the Qodana job instead of leaving a neutral check. PR and
push runs analyse only changed files, so this gates new findings; a dispatched
run still covers everything.

Tested: :slang:test 43/43 against the 2026.19 macos-aarch64 payload, which
takes the payload-directory path through the changed method.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Qodana for JVM

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2026.1.3
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@RefuX
RefuX merged commit 0d5cd8c into main Oct 2, 2026
7 checks passed
@RefuX
RefuX deleted the ci/qodana-warnings-as-errors branch October 2, 2026 08:56
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