-
-
Couldn't load subscription status.
- Fork 95
Automated Resyntax fixes #779
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
Use `make-temporary-directory` to make directories instead of `make-temporary-file`.
Nested `when` expressions can be merged into a single compound `when` expression.
This quasiquotation is equialent to a simple `list` call.
This `begin` form can be flattened into the surrounding definition context.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `map` operation can be replaced with a `for/list` loop.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Use `raise-arguments-error` instead of `error` for better error messages that follow Racket conventions.
This `string-append` with `format` expression can be simplified to a single `format` call.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `map` operation can be replaced with a `for/list` loop.
| (append (sort (send item get-shortcut-prefix) string<=? #:key symbol->string) | ||
| (list (send item get-shortcut)))) | ||
| (hash-update! shortcuts k (λ (v) (cons (send item get-label) v)) '()))) | ||
|
|
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'm not digging this change; the and seems harder to read, as does new set of line breaks.
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.
The line breaks are fmt's doing. As for the when merging, I think I'll try adjusting that rule to only fire if there's three or more nested when forms. That seems more likely to be an improvement when it applies.
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've filed jackfirth/resyntax#639 to address this.
| (k gui-thing)])))])) | ||
| (error 'find-output-radio-box "could not find `~a' radio box" | ||
| label))) | ||
| (raise-arguments-error 'find-output-radio-box "could not find `' radio box" "label" label))) |
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 change is incorrect.
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.
Oh, I see that you have already done something about this, @jackfirth . But also, this isn't a problem with the arguments of the function.
Resyntax fixed 19 issues in 7 files.
let-to-definequasiquote-to-listmap-to-forcond-let-to-cond-definestring-append-with-format-to-formatmake-temporary-directory-migrationnested-when-to-compound-wheninline-unnecessary-beginerror-to-raise-arguments-error