Skip to content

Qodana - #23

Merged
mambax7 merged 1 commit into
XoopsModules27x:mainfrom
mambax7:main
Dec 2, 2026
Merged

mambax7 merged 1 commit into
XoopsModules27x:mainfrom
mambax7:main

Conversation

@mambax7

@mambax7 mambax7 commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Add optional Qodana inspections alongside the project's existing quality checks.

New Features:

  • Add optional Qodana PHP, JavaScript, and TypeScript inspections for pull requests, selected pushes, and manual runs when a QODANA_TOKEN secret is configured.

CI:

  • Add a Qodana GitHub Actions workflow with restricted permissions, concurrency cancellation, and a skip notice when the token is unavailable.

Documentation:

  • Document Qodana setup, scan scope, token requirements, and maintenance in the README and a new Qodana guide.

Chores:

  • Add Qodana configuration for PHP 8.2 and the recommended inspection profile, excluding vendor and generated or private-content directories; update repository attributes and ignore rules for Qodana-related files.

Copilot AI balanced review requested due to automatic review settings December 2, 2026 18:20
@mambax7
mambax7 merged commit b559f69 into XoopsModules27x:main Dec 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Qodana configuration uses image instead of the required linter key, leaving the intended PHP scanner unconfigured because the workflow provides no image argument.

1 open issue
What changed in this PR

Adds optional Qodana inspections alongside the module’s existing quality checks.

Changes:

  • Adds a token-gated workflow for pull requests, selected pushes, and manual runs.
  • Configures PHP analysis and scan exclusions.
  • Documents setup and keeps Qodana artifacts out of version control and releases.
File Description
README.md Introduces the optional Qodana workflow.
qodana.yaml Defines the scanner, profile, PHP level, and exclusions.
docs/​QODANA.md Documents setup, scope, and maintenance.
.gitignore Ignores local Qodana results and caches.
.github/​workflows/​qodana.yml Adds token-gated scans and report uploads.
.gitattributes Excludes Qodana files from release archives.

Review effort: Balanced

Comment thread qodana.yaml
@@ -0,0 +1,22 @@
version: "1.0"

image: jetbrains/qodana-php:2026.2
@sourcery-ai

sourcery-ai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Configure the optional Qodana workflow and PHP analysis scope, including the repository-file handling needed for the setup.

  • .gitattributes L39-44
  • .github/workflows/qodana.yml L1-44
  • .gitignore L90-92
  • qodana.yaml L1-22

Documentation

Document how to enable Qodana, interpret its scope, and maintain the setup.

  • README.md L148-154
  • docs/QODANA.md L1-47

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. The workflow passes QODANA_TOKEN to the scanner while checking out pull-request code; a PR-controlled Qodana configuration could run a bootstrap command that exposes the token. Reverting stops future scans but cannot recover a token already disclosed, so it would need to be revoked.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@greptile-apps

greptile-apps Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

Confidence Score: 4/5RetriggerView in Greptile

[Medium impact] The PR adds an optional analysis workflow that can send scan results to Qodana Cloud.

The PR appears safe to merge, with non-blocking documentation and scan-scope fixes.

Findings

  1. P2 Release guide link breaks ▶
  2. P2 Setup advice conflicts with checks ▶
  3. P2 Copied files clutter reports ▶

Summary

Adds an optional, token-gated Qodana workflow and a PHP 8.2 inspection profile.

  • GitHub Actions can run an optional Qodana scan for this module.

Reviews (1) · Last reviewed commit: "Qodana" · Reviewed by Greptile

Comment thread .gitattributes
# Qodana development configuration
/.qodana export-ignore
/qodana.yaml export-ignore
/docs/QODANA.md export-ignore

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Release guide link breaks

The new README link points to docs/QODANA.md, but this rule removes that file from release archives. Anyone reading the packaged README gets a broken link. Keep the guide in the archive or link to its hosted copy.

Suggested change
/docs/QODANA.md export-ignore

Comment thread docs/QODANA.md
Comment on lines +26 to +27
development tools. Keep normal tests and quality tools in the shared
`xoops_lib/vendor` installation.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Setup advice conflicts with checks

The guide tells developers to keep normal tests and quality tools in xoops_lib/vendor, but this repository runs them from a module-local Composer installation. phpstan.neon.dist also loads rules from relative vendor/ paths. Following this advice can leave existing checks unable to find their required files. Limit the advice to Qodana and keep the module-local setup for existing checks.

Suggested change
development tools. Keep normal tests and quality tools in the shared
`xoops_lib/vendor` installation.
development tools. Existing tests and quality checks still use the module-local
Composer installation; run `composer install` from the module root for those checks.

Comment thread qodana.yaml
Comment on lines +15 to +22
- vendor
- node_modules
- .build
- .qodana
- coverage
- docs/00
- templates_c
- uploads

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Copied files clutter reports

The exclusions omit generated browser files under assets/, including assets/dist, while the guide says generated output is excluded. These files are copied from PHP DebugBar or mirrored from assets-custom/. Scanning them adds third-party and duplicate findings against files developers should not edit. Exclude the generated paths while keeping module-owned files in scope.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

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.

2 participants