-
Notifications
You must be signed in to change notification settings - Fork 12
Add support for warning-only refactoring rules #754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…-only results Co-authored-by: jackfirth <[email protected]>
Co-authored-by: jackfirth <[email protected]>
Co-authored-by: jackfirth <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resyntax analyzed 10 files in this pull request and has added suggestions.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resyntax analyzed 10 files in this pull request and has added suggestions.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resyntax analyzed 10 files in this pull request and has added suggestions.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resyntax analyzed 10 files in this pull request and found no issues.
jackfirth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Changed `refactoring-rule-suggested-fixes` to `refactoring-rule-suggestion-count` returning exact-nonnegative-integer - Replaced `#:suggested-fixes 'none` parameter with `#:no-suggestion` keyword as replacement template - Updated all test files to use new API - Tests pass Co-authored-by: jackfirth <[email protected]>
jackfirth
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When a rule uses #:no-suggestion, the transformer now returns (present #t) instead of (present #'(void)) for pattern matches. Co-authored-by: jackfirth <[email protected]>
Implementing support for warning-only refactoring rules (rules that can warn without fixing).
Plan:
define-refactoring-ruleto support warning-only rulesrefactoring-ruleobject type to track fix availabilityrefactoring-resultto support warning-only resultsrefactoring-rules-refactorto handle warning-only rulesresyntax fixcommandcomment-only-testSummary:
Successfully implemented complete support for warning-only refactoring rules with improved API based on code review feedback.
API:
refactoring-rule-suggestion-countreturnsexact-nonnegative-integer?(0 for no suggestions, 1 for one suggestion, extensible to multiple)#:no-suggestionkeyword as the replacement template position for warning-only rules#twhen pattern matches (instead of void)Example Usage:
All tests pass.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.