Coderabbitai/docstrings/4f5a1ed - #776
Conversation
…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>
…es' into coderabbitai/docstrings/4f5a1ed
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
📝 SummarySummary by CodeRabbit
WalkthroughThe pull request updates documentation for ChangesDocumentation updates
Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Feature Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
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. A rabbit reads the findings bright Comment |
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
Summary
Closes #
Type of change
How has this been verified?
Checklist
git commit -S).SPDX-License-Identifier(code/configMPL-2.0,prose
CC-BY-SA-4.0); I did not relicense existing files.Notes for reviewers