Repository navigation
ci: let Sourcery skip rule-test fixtures - #471
Merged
Merged
Conversation
The semgrep and ast-grep rule tests contain findings on purpose, but Sourcery reviews them and fails its check. Add a versioned .sourcery.yaml whose ignore list skips the fixtures (keeping Sourcery's default ignores); the rule files themselves stay reviewed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a repository-level Sourcery configuration that preserves its default ignores and skips Semgrep and ast-grep test fixtures containing intentional findings, preventing review failures while keeping the actual rules subject to Sourcery review. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #471 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 29 29
Lines 3446 3446
=========================================
Hits 3446 3446
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
uniqueg
marked this pull request as ready for review
October 24, 2026 13:48
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".sourcery.yaml" line_range="3" />
<code_context>
+# Sourcery configuration; see
+# https://docs.sourcery.ai/Coding-Assistant/Reference/Configuration/sourcery-yaml/
+ignore:
+ # Sourcery's defaults (setting `ignore` replaces them)
+ - .git
</code_context>
<issue_to_address>
**Fixture findings still fail checks**
When the hosted GitHub reviewer no longer reads `.sourcery.yaml`, sourcery does not apply `ignore`, so the rule-test findings remain in its review and its check still fails.
Verify on a PR that touches the fixtures that GitHub reviews honor this setting; otherwise configure the review Path Filters.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: .sourcery.yaml:3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a versioned
.sourcery.yamlwhoseignorelist skips the semgrep and ast-grep rule-test fixtures (.semgrep/*.py,.semgrep/*.test.yaml,.ast-grep/rule-tests/). These contain findings on purpose, but Sourcery reviews them and fails its check (see elixir-cloud-aai/trs-filer#149). The rule files themselves stay reviewed, because Sourcery's comments on them were useful. Sourcery's default ignores are kept, since settingignorereplaces them. The same file goes into foca, cloud-registry, proTES and trs-filer.Syntax: the
ignorefield of the.sourcery.yamlreference (archived 2025-06), which says it "affects the IDE plugins, the CLI, and GitHub". The current docs only describe the dashboard's "Path Filters" (review settings) and don't mention.sourcery.yaml, so whether the file still applies to PR reviews must be checked on a PR that touches the fixtures.Light lane: configuration only (one new YAML file, no code, no secrets, no workflows), so no reviewer subagents; I reviewed the diff myself.
Verification
pre-commit run --files .sourcery.yaml: all hooks passed (check yaml, end of files, trailing whitespace, semgrep, …)Open questions
None.
Closes #470
🤖 Generated with Claude Code
Summary by Sourcery
Enhancements: