Files
CommandForge/.gitea/workflows/qodana.yml
T
poli0981andClaude Opus 5.5 43606c5b9f ci(qodana): run the Qodana CLI through the ops reusable workflow
JetBrains/qodana-action needs GitHub's APIs (annotations, the PR comment, the
cache). The ops repo's reusable-qodana.yml runs the pinned, checksum-verified
Qodana CLI natively on the Windows runner instead, builds the solution first
and keeps the report as an artifact; the results still go to Qodana Cloud.
The token check job goes: Gitea has no fork pull requests, and runs started
by renovate-bot skip the scan in the reusable itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 09:07:39 +07:00

47 lines
2.0 KiB
YAML

name: Qodana
# JetBrains Qodana for .NET (`qodana-dotnet`, Rider's engine, on the Ultimate licence of the Qodana
# Cloud project): ReSharper's C#, XAML and .resx inspections, the IntelliJ platform's Markdown and
# XML inspections and JetBrains' security rules, over the whole solution. Every setting is in
# qodana.yaml; the gate there is zero problems.
#
# Runs the Qodana CLI through the ops repo's reusable-qodana.yml (JetBrains/qodana-action needs
# GitHub's APIs). Gitea has no code-scanning UI: the results go to Qodana Cloud and to the run's
# `qodana-report` artifact (SARIF and the linter's logs, for a reader without a Qodana Cloud account).
#
# - Native mode on `windows-latest` (host mode on the maintainer's PC): WPF (net10.0-windows) only
# loads on Windows, and the linter reads the projects with the SDK global.json names.
# - The solution is built first (prepare-command), so a build that fails is one red step with the
# compiler's own message rather than a report of unresolved symbols.
# - Advisory: not a required check of `main`, so a finding, a Qodana Cloud outage or a lapsed licence
# is a red job beside a green build, never a blocked merge. Runs started by renovate-bot skip it
# (the reusable's rule: a same-repo pull request gets the repository's secrets).
# Requires the repository secret QODANA_TOKEN.
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
qodana:
permissions:
contents: read
uses: poli0981/.github/.gitea/workflows/reusable-qodana.yml@c133a00dc7a0bd7bd68253d415758b408d615fa4 # ops v2026.11.4
with:
runs-on: windows-latest
dotnet-global-json-file: global.json
prepare-command: dotnet build CommandForge.slnx -c Release
artifact-name: qodana-report
secrets:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}