Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts GitHub annotation formatting to always include a default line number for error/warning messages and bumps the package version for release. Sequence diagram for GitHub annotations with default line numbersequenceDiagram
actor Developer
participant RuffSyncFormatter as RuffSyncFormatter
participant GitHubActions as GitHub_Actions_Interpreter
Developer->>RuffSyncFormatter: error(message, file_path)
RuffSyncFormatter->>RuffSyncFormatter: escape(file_path, is_property=True)
RuffSyncFormatter->>RuffSyncFormatter: build file_arg = file=<path>,line=1,
RuffSyncFormatter->>RuffSyncFormatter: escape("Ruff Sync Error", is_property=True)
RuffSyncFormatter->>GitHubActions: write ::error file=<path>,line=1, title=Ruff Sync Error::message
GitHubActions->>GitHubActions: parse annotation
GitHubActions-->>Developer: display error pinned to line 1 in file
Developer->>RuffSyncFormatter: warning(message, file_path)
RuffSyncFormatter->>RuffSyncFormatter: escape(file_path, is_property=True)
RuffSyncFormatter->>RuffSyncFormatter: build file_arg = file=<path>,line=1,
RuffSyncFormatter->>RuffSyncFormatter: escape("Ruff Sync Warning", is_property=True)
RuffSyncFormatter->>GitHubActions: write ::warning file=<path>,line=1, title=Ruff Sync Warning::message
GitHubActions->>GitHubActions: parse annotation
GitHubActions-->>Developer: display warning pinned to line 1 in file
File-Level Changes
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 @@
## main #132 +/- ##
=======================================
Coverage 92.78% 92.78%
=======================================
Files 6 6
Lines 929 929
=======================================
Hits 862 862
Misses 67 67 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Instead of hardcoding
line=1, consider threading through an optionallineargument (defaulting to 1) so callers can specify more precise locations in the future. - The logic for building the GitHub annotation arguments in
errorandwarningis now duplicated; you could extract a small helper to generatefile_arg(and potentially other shared pieces) to keep these paths consistent.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Instead of hardcoding `line=1`, consider threading through an optional `line` argument (defaulting to 1) so callers can specify more precise locations in the future.
- The logic for building the GitHub annotation arguments in `error` and `warning` is now duplicated; you could extract a small helper to generate `file_arg` (and potentially other shared pieces) to keep these paths consistent.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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 by Sourcery
Adjust GitHub formatter output to include a default line number and bump the project version.
Bug Fixes:
Build: