Skip to content

Add Codacy config to exclude test/ from analysis - #45

Merged
mason-sharp merged 2 commits into
mainfrom
feat/SPOC-620/codacy-security-triage
Jul 31, 2026
Merged

Add Codacy config to exclude test/ from analysis#45
mason-sharp merged 2 commits into
mainfrom
feat/SPOC-620/codacy-security-triage

Conversation

@rasifr

@rasifr rasifr commented Jul 31, 2026

Copy link
Copy Markdown
Member

Python test harness files under test/ were generating Codacy issues that don't apply to production extension code.

Python test harness files under test/ were generating Codacy issues
that don't apply to production extension code.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mason-sharp, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 84a48456-9e72-4cbe-a544-51459eeb2dc8

📥 Commits

Reviewing files that changed from the base of the PR and between aeadd3f and 9254ec6.

📒 Files selected for processing (2)
  • .codacy.yml
  • Dockerfile
📝 Walkthrough

Walkthrough

The change updates Codacy exclusions and configures the Docker image to run PostgreSQL as the non-root postgres user.

Changes

Repository configuration

Layer / File(s) Summary
Codacy analysis exclusions
.codacy.yml
Codacy excludes test/**, the Docker CI SSH harness, and sql/*.sql from analysis.
Docker runtime user
Dockerfile
The image switches to the non-root postgres user before the PostgreSQL entrypoint starts.

Poem

I hop as the container starts,
postgres guards its database heart.
Codacy skips the paths it should,
Test and SQL are understood.
A secure burrow, neat and good!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary change: excluding the test/ directory from Codacy analysis.
Description check ✅ Passed The description explains why test harness files are excluded from Codacy analysis and matches the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/SPOC-620/codacy-security-triage

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.

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

@mason-sharp
mason-sharp force-pushed the feat/SPOC-620/codacy-security-triage branch from f6c28e6 to aeadd3f Compare July 31, 2026 18:43

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Dockerfile`:
- Line 21: Update the Dockerfile’s USER postgres configuration so
docker-entrypoint.sh starts with root privileges and can repair ownership of
mounted PGDATA or /var/lib/postgresql directories; only switch to postgres after
this initialization via a privileged wrapper if needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 697201db-1fa1-4908-ae10-912cc586bf9f

📥 Commits

Reviewing files that changed from the base of the PR and between f6c28e6 and aeadd3f.

📒 Files selected for processing (2)
  • .codacy.yml
  • Dockerfile
🚧 Files skipped from review as they are similar to previous changes (1)
  • .codacy.yml

Comment thread Dockerfile
@mason-sharp
mason-sharp force-pushed the feat/SPOC-620/codacy-security-triage branch from aeadd3f to 93db25c Compare July 31, 2026 18:50
Run container as postgres user instead of root

Add USER postgres to the Dockerfile after the build steps, which
still need root to install into the PostgreSQL lib/share dirs.
Exclude docker/** from Codacy: that image is a CI-only SSH test
harness whose sshd requires root.
@mason-sharp
mason-sharp force-pushed the feat/SPOC-620/codacy-security-triage branch from 93db25c to 9254ec6 Compare July 31, 2026 19:12
@mason-sharp
mason-sharp merged commit a7bdcfe into main Jul 31, 2026
14 checks passed
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