Skip to content

t4346: fix Codacy CI failures - add .codacy.yml config#4364

Merged
alex-solovyev merged 1 commit intomainfrom
bugfix/4346-codacy-ci-failure
Mar 13, 2026
Merged

t4346: fix Codacy CI failures - add .codacy.yml config#4364
alex-solovyev merged 1 commit intomainfrom
bugfix/4346-codacy-ci-failure

Conversation

@alex-solovyev
Copy link
Collaborator

Summary

  • Adds .codacy.yml to configure Codacy's static analysis engine for this repo
  • Excludes archived/ directory (matches existing CI shellcheck exclusion in code-quality.yml)
  • Excludes non-code paths (node_modules/, .git/, configs/*.json.txt)
  • Explicitly enables relevant analysis engines (shellcheck, semgrep, trivy, pylint, eslint)

Root Cause (GH#4346)

Two distinct failure modes were observed:

  1. PR GH#3624: fix critical quality-debt from PR #139 review feedback #4335 (not_collected): Transient Codacy service issue — no code problems, but Codacy returned action_required with empty summary. This is a Codacy service-level issue; the .codacy.yml exclude paths reduce analysis surface and may reduce timeout risk.

  2. PR GH#3603: fix critical quality-debt from PR #436 review feedback #4338 (1 new issue): Codacy flagged SC2086 (Double quote to prevent globbing) in the old code being removed by the PR. The PR was actually fixing that exact issue (replacing unquoted $wp_command with array-based "${wp_args[@]}"). Codacy's diff analysis picked up the base branch code as a new issue.

Both PRs were already merged; the current codebase is clean (PR #4343 passes Codacy). This PR adds the config to prevent recurrence.

Why .codacy.yml and not a workflow change

Codacy is an external check (not a GitHub Actions workflow we control). Its behavior is configured via:

  1. Codacy's web UI (threshold settings)
  2. .codacy.yml in the repo root (analysis scope, engine config)

The .codacy.yml approach is the correct lever — it is version-controlled, reviewable, and does not require UI access.

Verification

  • Codacy will pick up .codacy.yml automatically on the next PR analysis
  • The archived/ exclusion matches the existing shellcheck exclusion in .github/workflows/code-quality.yml line 125
  • Existing .shellcheckrc disable rules (SC1091, SC2329, etc.) are read by Codacy's shellcheck engine automatically

Closes #4346

…#4346)

Root cause: Codacy's external check was flagging issues in code being removed
by PRs (SC2086 in old wp-helper.sh code) and returning 'not_collected' on
transient service issues. Both caused 'action_required' conclusions.

Fix: Add .codacy.yml to:
- Exclude archived/ directory (matches CI shellcheck exclusion)
- Exclude node_modules/, .git/, configs/*.json.txt (non-code paths)
- Explicitly enable relevant analysis engines

Codacy reads .shellcheckrc automatically, so existing SC disable rules
(SC1091, SC2329, etc.) apply without duplication.

Closes #4346
@github-actions github-actions bot added the bug Auto-created from TODO.md tag label Mar 13, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 13, 2026

Important

Review skipped

Auto reviews are limited based on label configuration.

🚫 Review skipped — only excluded labels are configured. (1)
  • no-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bfe1fb45-e3fb-47b2-9259-387c516cc330

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/4346-codacy-ci-failure
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses recurring Codacy CI failures by introducing a .codacy.yml configuration file. The primary goal is to fine-tune Codacy's static analysis behavior, preventing false positives and issues related to analysis scope. By defining specific engines and excluding irrelevant directories, the configuration ensures more accurate and efficient code quality checks, aligning Codacy's analysis with the project's established quality standards and existing CI workflows.

Highlights

  • Codacy Configuration File: Added a .codacy.yml file to the repository root to configure Codacy's static analysis engine.
  • Path Exclusions: Configured Codacy to exclude archived/, node_modules/, .git/, and configs/*.json.txt paths from analysis, aligning with existing CI exclusions and focusing analysis on relevant code.
  • Engine Activation: Explicitly enabled key analysis engines including shellcheck, semgrep, trivy, pylint, and eslint within the Codacy configuration.
Changelog
  • .codacy.yml
    • Added a new configuration file for Codacy static analysis.
    • Configured enabled engines: shellcheck, semgrep, trivy, pylint, eslint.
    • Defined excluded paths: archived/**, node_modules/**, .git/**, configs/*.json.txt.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link
Contributor

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 412 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Fri Mar 13 07:16:18 UTC 2026: Code review monitoring started
Fri Mar 13 07:16:19 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 412

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 412
  • VULNERABILITIES: 0

Generated on: Fri Mar 13 07:16:21 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a .codacy.yml configuration file to customize the Codacy static analysis for the repository. The configuration explicitly enables several analysis engines and excludes paths that are not relevant for analysis, such as archived code, vendor directories, and configuration templates. This is a good step towards making the CI process more reliable. My review includes one suggestion to make an exclusion pattern more robust to handle files in subdirectories, ensuring it remains effective as the project evolves.

- "node_modules/**"
- ".git/**"
# Config templates (not executable code)
- "configs/*.json.txt"

Choose a reason for hiding this comment

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

medium

The current exclusion pattern configs/*.json.txt only matches files directly within the configs/ directory. If config templates are ever added to subdirectories (e.g., configs/staging/settings.json.txt), they will not be excluded from analysis. To make this rule more robust and future-proof, consider using a recursive glob pattern.

  - "configs/**/*.json.txt"

@sonarqubecloud
Copy link

@alex-solovyev alex-solovyev merged commit 1a7b5b6 into main Mar 13, 2026
24 checks passed
@alex-solovyev alex-solovyev deleted the bugfix/4346-codacy-ci-failure branch March 13, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Auto-created from TODO.md tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Systemic CI failure: Codacy Static Code Analysis (2 events)

1 participant