Skip to content

Coderabbitai/docstrings/4f5a1ed - #776

Merged
hyperpolymath merged 11 commits into
mainfrom
coderabbitai/docstrings/4f5a1ed
Sep 12, 2026
Merged

hyperpolymath merged 11 commits into
mainfrom
coderabbitai/docstrings/4f5a1ed

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Closes #

Type of change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 💥 Breaking change (would change existing behaviour)
  • 🕳️ Soundness fix (fixes a checker/proof false-negative)
  • 📖 Documentation
  • 🧹 Refactor / tech debt (behaviour-preserving)
  • ⚡ Performance
  • 🔧 Build / CI / tooling

How has this been verified?

Checklist

  • My commits are signed (git commit -S).
  • I ran the project's own checks/tests locally and they pass.
  • New files carry the correct SPDX-License-Identifier (code/config MPL-2.0,
    prose CC-BY-SA-4.0); I did not relicense existing files.
  • Docs are updated, and no public claim now overstates what the code does.
  • I have not introduced a soundness hole (or I have flagged where I might have).

Notes for reviewers

hyperpolymath and others added 10 commits September 9, 2026 23:11
…rived rule

`Hypatia.Rules.CicdRules.scan_content_patterns/1` is a complete glob+regex
per-line content-rule engine over a `@blocked_patterns` table — supporting
`applies_to` globs, `path_allow_prefixes`, `exception`/`exception_repos`,
`negative: true` absence rules and inline `# hypatia:ignore <rule_id>`
pragmas — and it emits line-anchored findings. It had no caller anywhere in
`lib/`; its only reference was its own test file. This wires it in.

H1 adds a `:content_patterns` entry to `@all_rule_modules` with a
normalization branch in `Hypatia.CLI.collect_findings/2` that carries `line:`
through to the finding map, so SARIF gets a real `startLine` rather than the
degenerate fallback of 1.

H2 adds the first scanner-derived rule as a table row rather than a module:
`--frozen-lockfile` enforcement in CI, the one piece of advice flagged
independently by both CodeRabbit and Codacy across the estate. Matching runs
over comment-stripped content, so a commented-out install line does not fire.

H3 covers all three with tests: a positive case, an explicit negative proving
the canonical fix is not flagged, and a comment-only case.

Not encoded: Codacy's "switch to a commit SHA" advice, which contradicts the
standing ruling that `sha_pinning_required` is off and `actions.lock` is the
pin. Scanner advice is input to triage, not a rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Docstrings generation was requested by @hyperpolymath.

* #753 (comment)

The following files were modified:

* `lib/hypatia/cli.ex`
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: hyperpolymath <6759885+hyperpolymath@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 7e755451-dbc7-424e-9433-92b978ed8c2f

📥 Commits

Reviewing files that changed from the base of the PR and between 98513e5 and 1b3df23.

📒 Files selected for processing (2)
  • lib/hypatia/cli.ex
  • lib/rules/cicd_rules.ex

📝 Summary

Summary by CodeRabbit

  • Documentation
    • Updated developer documentation for repository scanning and content-pattern checks.
    • Documented the rules covered by content scanning and the structure of returned findings.
    • Clarified parameters, return values, source locations, and requirements for network access and credentials when applicable.

Walkthrough

The pull request updates documentation for collect_findings/2 and scan_content_patterns/1. It adds parameter, return-value, rule, and finding-field details. No runtime behaviour changes.

Changes

Documentation updates

Layer / File(s) Summary
Finding API documentation
lib/hypatia/cli.ex, lib/rules/cicd_rules.ex
The documentation describes selected rule modules, activated content-pattern rules, parameters, network requirements, and finding map fields.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Feature

Suggested reviewers: mistral-vibe

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

A rabbit reads the findings bright
With rules named clear in morning light
Each field sits neatly in its place
Documentation keeps the pace
No code hops, only words take flight

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

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@hyperpolymath
hyperpolymath merged commit e369746 into main Sep 12, 2026
14 of 15 checks passed
@hyperpolymath
hyperpolymath deleted the coderabbitai/docstrings/4f5a1ed branch September 12, 2026 16:20
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.

3 participants