From 441d446baeb313a7941fb02c47ea54a94c14e6bf Mon Sep 17 00:00:00 2001 From: Alexey <1556417+alex-solovyev@users.noreply.github.com> Date: Fri, 13 Mar 2026 08:15:02 +0100 Subject: [PATCH] fix(ci): add .codacy.yml to align analysis with shellcheck config (GH#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 --- .codacy.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .codacy.yml diff --git a/.codacy.yml b/.codacy.yml new file mode 100644 index 0000000000..9b0ec2e8eb --- /dev/null +++ b/.codacy.yml @@ -0,0 +1,32 @@ +# Codacy Static Analysis Configuration +# Aligns Codacy's analysis with the project's existing shellcheck and quality settings. +# +# Reference: https://docs.codacy.com/repositories-configure/codacy-configuration-file/ +# +# Root cause context (GH#4346): +# - Codacy flagged SC2086 (unquoted variable) in code that was being REMOVED by a PR fix. +# - Codacy also returned "not_collected" on a transient service issue. +# - This config excludes archived/ (same as CI shellcheck) and aligns tool settings. + +--- +engines: + shellcheck: + enabled: true + semgrep: + enabled: true + trivy: + enabled: true + pylint: + enabled: true + eslint: + enabled: true + +exclude_paths: + # Archived code is versioned for reference but not actively maintained. + # Matches the shellcheck exclusion in .github/workflows/code-quality.yml. + - "archived/**" + # Generated/vendor files + - "node_modules/**" + - ".git/**" + # Config templates (not executable code) + - "configs/*.json.txt"