Configure advisory Qodana analysis (#313)
## Summary - configure advisory Qodana PHP 2026.1 analysis for trusted pull requests and master, beta, canary, and internal branch scans - install both Composer projects and the edge-agent/edge-broker Node dependencies before analysis - exclude generated, vendor, build, cache, legacy-test, and local-agent trees - keep Quick Fixes, SARIF artifacts, baselines, thresholds, and required-check enforcement disabled during calibration ## Safety - fails closed when QODANA_TOKEN is absent - skips draft, fork, and Dependabot pull requests - uses least-privilege GitHub permissions and immutable action SHAs - uploads findings to the dedicated api Qodana Cloud project ## Validation - actionlint 1.7.12 - SchemaStore qodana-1.0 validation - bootstrap shell syntax and lockfile structure checks - immutable action tag verification - git diff --check - independent review completed with no findings ## Live verification - [PR-mode scan](https://github.com/copenhagentruckwash/api/actions/runs/29494056175) completed successfully with 0 changed-file problems, 439 inspections, and a passed license audit ([Qodana report](https://qodana.cloud/projects/P2nXd/reports/LJv98e)) - [full branch scan](https://github.com/copenhagentruckwash/api/actions/runs/29495399119) completed successfully and uploaded 8,248 current findings across 725 files, 439 inspections, and a passed license audit to the dedicated api project ([Qodana report](https://qodana.cloud/projects/P2nXd/reports/qJMOxX)) - the initial debt remains advisory; baseline and required-check enforcement are intentionally deferred until findings are triaged
This commit is contained in:
+28
-40
@@ -1,46 +1,34 @@
|
||||
#-------------------------------------------------------------------------------#
|
||||
# Qodana analysis is configured by qodana.yaml file #
|
||||
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
|
||||
#-------------------------------------------------------------------------------#
|
||||
|
||||
#################################################################################
|
||||
# WARNING: Do not store sensitive information in this file, #
|
||||
# as its contents will be included in the Qodana report. #
|
||||
#################################################################################
|
||||
version: "1.0"
|
||||
|
||||
#Specify inspection profile for code analysis
|
||||
linter: jetbrains/qodana-php:2026.1
|
||||
|
||||
profile:
|
||||
name: qodana.starter
|
||||
name: qodana.recommended
|
||||
|
||||
#Enable inspections
|
||||
#include:
|
||||
# - name: <SomeEnabledInspectionId>
|
||||
php:
|
||||
version: "8.2"
|
||||
|
||||
#Disable inspections
|
||||
#exclude:
|
||||
# - name: <SomeDisabledInspectionId>
|
||||
# paths:
|
||||
# - <path/where/not/run/inspection>
|
||||
bootstrap: |+
|
||||
set -eu
|
||||
composer --working-dir=services/nginx/app install --no-interaction --prefer-dist --no-progress --ignore-platform-reqs
|
||||
composer --working-dir=services/nginx/app/modules/washcertificates install --no-interaction --prefer-dist --no-progress --ignore-platform-reqs
|
||||
npm --prefix services/edge-agent ci --ignore-scripts
|
||||
npm --prefix services/edge-broker ci --ignore-scripts
|
||||
|
||||
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
|
||||
#bootstrap: sh ./prepare-qodana.sh
|
||||
|
||||
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
|
||||
#plugins:
|
||||
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
|
||||
|
||||
# Quality gate. Will fail the CI/CD pipeline if any condition is not met
|
||||
# severityThresholds - configures maximum thresholds for different problem severities
|
||||
# testCoverageThresholds - configures minimum code coverage on a whole project and newly added code
|
||||
# Code Coverage is available in Ultimate and Ultimate Plus plans
|
||||
#failureConditions:
|
||||
# severityThresholds:
|
||||
# any: 15
|
||||
# critical: 5
|
||||
# testCoverageThresholds:
|
||||
# fresh: 70
|
||||
# total: 50
|
||||
|
||||
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
|
||||
linter: jetbrains/qodana-php:2025.3
|
||||
exclude:
|
||||
- name: All
|
||||
paths:
|
||||
- services/nginx/app/vendor
|
||||
- services/nginx/app/modules/washcertificates/vendor
|
||||
- services/nginx/app/build
|
||||
- services/nginx/app/.phpunit.cache
|
||||
- services/nginx/app/tests/Legacy
|
||||
- services/edge-agent/node_modules
|
||||
- services/edge-broker/node_modules
|
||||
- services/edge-agent/dist
|
||||
- documentation/generated
|
||||
- documentation/topics/generated
|
||||
- documentation/_build
|
||||
- documentation/_site_rebuild_20260317
|
||||
- .tmp
|
||||
- .openclaw
|
||||
|
||||
Reference in New Issue
Block a user