Skip to content

chore: exclude tests from all Codacy engines - #16

Merged
cchacs merged 1 commit into
mainfrom
chore/codacy-exclude-tests
Oct 1, 2026
Merged

cchacs merged 1 commit into
mainfrom
chore/codacy-exclude-tests

Conversation

@cchacs

@cchacs cchacs commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

What

Adds a top-level exclude_paths: ["tests/**"] to .codacy.yml, alongside the existing bandit-only exclusion.

Why

tests/js/screen.test.js (added by #15, not yet on main) extracts the shipped frameDriverProblem gate from screen.js and runs it with new Function(...). Codacy's "calls eval/Function()" rule flags that as a failure on #15. The only input is the repo's own source file, so it is a false positive. The existing exclusion applied to bandit only, which is a different engine.

Codacy reads its config from the default branch, so this only takes effect for other PRs once merged.

Scope

The exclusion is deliberately all-engine for tests/**: tests here are fixtures and harness code, and a path-wide exclusion is simpler than chasing per-rule names across engines. If you'd rather keep other linters on tests, narrow it to the specific engine/rule instead.

Notes

  • Config-only change; no plugin version bump or changelog entry needed.
  • Does not address the screen.js "Generic Object Injection Sink" warning on split?.[name] (name comes from the constant SPLIT_BRIDGE); that is a warning only and also a false positive.

🤖 Generated with Claude Code

https://claude.ai/code/session_011z8rJouNkhLnn86GrA6qJ4

The JS test extracts the shipped gate from screen.js and runs it with
new Function(); Codacy's eval/Function() rule flags that as a failure.
The input is the repo's own source, so it is a false positive. The
existing exclusion only covered bandit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011z8rJouNkhLnn86GrA6qJ4
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Comment thread .codacy.yml
@@ -1,4 +1,6 @@
---
exclude_paths:
- "tests/**"

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.

SUGGESTION: Rationale references a file that does not exist in this repo, and the exclusion is broader than needed

The PR description justifies this by tests/js/screen.test.js calling new Function(...), but the only tracked file under tests/ is tests/test_routes.py; there is no tests/js/ directory and no screen.test.js anywhere in the tree. Either the motivating finding came from a different branch/repo state, or the trigger no longer exists.

Also note that a top-level exclude_paths removes the whole tests/ tree from every Codacy engine (linters included), which is wider than the single eval/Function() failure described. Narrowing to the specific engine/rule, or keeping the top-level entry with a comment explaining why all of tests/ is excluded, would keep test coverage for unrelated rules.

Not blocking - the config itself is valid and matches Codacy's schema.


Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@kilo-code-bot

kilo-code-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 1 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
.codacy.yml 3 Rationale cites tests/js/screen.test.js, which is not tracked in this repo; top-level exclude_paths also removes all of tests/ from every engine, broader than the described eval/Function() failure
Files Reviewed (1 files)
  • .codacy.yml - 1 issue

Fix these issues in Kilo Cloud


Reviewed by free · Input: 0 · Output: 0 · Cached: 0

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • Exclude tests from all Codacy engines: Added a top-level exclude_paths: ["tests/**"] to .codacy.yml (in addition to the bandit-specific exclusion) so all Codacy engines skip test files. This is a configuration-only change with no code, API, or runtime behavior changes.

Pullfrog  | View workflow run | Using big-pickle (free) | 𝕏

@cchacs
cchacs merged commit 819b77c into main Oct 1, 2026
6 of 7 checks passed
@cchacs
cchacs deleted the chore/codacy-exclude-tests branch October 11, 2026 10:08
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.

1 participant