-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Automated Resyntax fixes #716
base: master
Are you sure you want to change the base?
Conversation
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This expression can be replaced with a simpler, equivalent `hash-update!` expression.
These nested `for` loops can be replaced by a single `for*` loop.
This `if` expression can be refactored to an equivalent expression using `and`.
Use the `#:when` keyword instead of `when` to reduce loop body indentation.
This expression is equivalent to calling the `positive?` predicate.
(let* ([pos-left (- (syntax-position stx) 1)] | ||
[pos-right (+ pos-left (syntax-span stx))]) | ||
(send defs-text | ||
syncheck:add-jump-to-definition/phase-level+space |
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.
I think this isn't how we want to format send
calls. I would prefer the method name be as it was before, on the same line as the send
.
;; assume this is a binder, show uses | ||
#;(when (and color? (zero? start)) | ||
(color-unused-binder (list-ref key 0) (list-ref key 1) (list-ref key 2))) | ||
[(zero? end) (show-starts)] |
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.
Something went wrong here. The code should behave the same but the comment went into the wrong place.
(color-unused-binder (list-ref key 0) (list-ref key 1) (list-ref key 2))) | ||
[(zero? end) (show-starts)] | ||
;; assume this is a use, show bindings (usually just one, so do nothing) | ||
[(zero? start) (show-ends)] |
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.
same here, although this one is less wrong, I'd say.
Aside from the comments, this looks good to me. |
Resyntax fixed 20 issues in 3 files.
let-to-define
nested-for-to-for*
if-else-false-to-and
when-expression-in-for-loop-to-when-keyword
hash-set!-ref-to-hash-update!
zero-comparison-to-positive?