-
-
Notifications
You must be signed in to change notification settings - Fork 103
Resyntax testing #1313
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
Resyntax testing #1313
Conversation
Another test pull request to get Resyntax to behave correctly. Ignore this.
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 1 file in this pull request and has added suggestions.
(define (foo) | ||
(let ([x 1]) | ||
(+ x x))) |
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.
let-to-define
: Internal definitions are recommended instead of let
expressions, to reduce nesting.
(define (foo) | |
(let ([x 1]) | |
(+ x x))) | |
(define (foo) | |
(define x 1) | |
(+ x x)) |
Debugging details
Textual replacement
(line-replacement
#:new-lines '#("(define (foo)" " (define x 1)" " (+ x x))")
#:original-lines '#("(define (foo)" " (let ([x 1])" " (+ x x)))")
#:start-line 77)
Syntactic replacement
(syntax-replacement
#:introduction-scope #<procedure:do-make-syntax-introducer>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/snapshot/pkgs/resyntax/default-recommendations/let-binding-suggestions.rkt:45:3 (define (foo) NEWLINE (define x 1) NEWLINE (+ x x))>
#:original-syntax
#<syntax:typed-racket-lib/typed-racket/private/type-contract.rkt:77:0 (define (foo) (let ((x 1)) (+ x x)))>)
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 1 file in this pull request and has added suggestions.
(define (foo) | ||
(let ([x 1]) | ||
(+ x x))) |
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.
let-to-define
: Internal definitions are recommended instead of let
expressions, to reduce nesting.
(define (foo) | |
(let ([x 1]) | |
(+ x x))) | |
(define (foo) | |
(define x 1) | |
(+ x x)) |
Debugging details
Textual replacement
(line-replacement
#:new-lines '#("(define (foo)" " (define x 1)" " (+ x x))")
#:original-lines '#("(define (foo)" " (let ([x 1])" " (+ x x)))")
#:start-line 77)
Syntactic replacement
(syntax-replacement
#:introduction-scope #<procedure:do-make-syntax-introducer>
#:new-syntax
#<syntax:/home/runner/.local/share/racket/snapshot/pkgs/resyntax/default-recommendations/let-binding-suggestions.rkt:45:3 (define (foo) NEWLINE (define x 1) NEWLINE (+ x x))>
#:original-syntax
#<syntax:typed-racket-lib/typed-racket/private/type-contract.rkt:77:0 (define (foo) (let ((x 1)) (+ x x)))>)
It works! Closing this now. |
This pull request has been mentioned on Racket Discussions. There might be relevant details there: https://racket.discourse.group/t/rfc-adding-resyntax-code-reviews-to-core-racket-repositories/1746/4 |
Another test pull request to get Resyntax to behave correctly. Ignore this.