Add support for warning-only refactoring rules#754
Open
Conversation
…-only results Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for rules to warn without fixing
Add support for warning-only refactoring rules
Nov 12, 2025
Contributor
There was a problem hiding this comment.
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>
Contributor
There was a problem hiding this comment.
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>
Contributor
There was a problem hiding this comment.
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>
Contributor
There was a problem hiding this comment.
Resyntax analyzed 10 files in this pull request and found no issues.
jackfirth
requested changes
Nov 13, 2025
- 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 <8175575+jackfirth@users.noreply.github.com>
jackfirth
requested changes
Nov 13, 2025
When a rule uses #:no-suggestion, the transformer now returns (present #t) instead of (present #'(void)) for pattern matches. Co-authored-by: jackfirth <8175575+jackfirth@users.noreply.github.com>
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.
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.