t4346: fix Codacy CI failures - add .codacy.yml config#4364
t4346: fix Codacy CI failures - add .codacy.yml config#4364alex-solovyev merged 1 commit intomainfrom
Conversation
…#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
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
Summary of ChangesHello, 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 Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Mar 13 07:16:21 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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"
|



Summary
.codacy.ymlto configure Codacy's static analysis engine for this repoarchived/directory (matches existing CI shellcheck exclusion incode-quality.yml)node_modules/,.git/,configs/*.json.txt)Root Cause (GH#4346)
Two distinct failure modes were observed:
PR GH#3624: fix critical quality-debt from PR #139 review feedback #4335 (
not_collected): Transient Codacy service issue — no code problems, but Codacy returnedaction_requiredwith empty summary. This is a Codacy service-level issue; the.codacy.ymlexclude paths reduce analysis surface and may reduce timeout risk.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_commandwith 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.ymland not a workflow changeCodacy is an external check (not a GitHub Actions workflow we control). Its behavior is configured via:
.codacy.ymlin the repo root (analysis scope, engine config)The
.codacy.ymlapproach is the correct lever — it is version-controlled, reviewable, and does not require UI access.Verification
.codacy.ymlautomatically on the next PR analysisarchived/exclusion matches the existing shellcheck exclusion in.github/workflows/code-quality.ymlline 125.shellcheckrcdisable rules (SC1091, SC2329, etc.) are read by Codacy's shellcheck engine automaticallyCloses #4346