-
Notifications
You must be signed in to change notification settings - Fork 3
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 #106
Merged
Merged
Conversation
This file contains 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
This is an automated change generated by Resyntax. #### Pass 1 Applied 3 fixes to [`elements.rkt`](../blob/HEAD/elements.rkt) * Line 20, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 124, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. * Line 201, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. Applied 1 fix to [`parsers/foes.rkt`](../blob/HEAD/parsers/foes.rkt) * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 6 fixes to [`aoe-images.rkt`](../blob/HEAD/aoe-images.rkt) * Line 15, `predicate/c-migration`: The `predicate/c` contract is less clear than a `->` contract and no longer improves performance. * Line 19, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 28, `define-let-to-double-define`: This `let` expression can be pulled up into a `define` expression. * Line 91, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call. * Line 92, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call. * Line 105, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call. Applied 1 fix to [`manager/db.rkt`](../blob/HEAD/manager/db.rkt) * Line 8, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`syntax/monsters.rkt`](../blob/HEAD/syntax/monsters.rkt) * Line 24, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`manager/transition.rkt`](../blob/HEAD/manager/transition.rkt) * Line 9, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`curlique.rkt`](../blob/HEAD/curlique.rkt) * Line 12, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`loot-cards.rkt`](../blob/HEAD/loot-cards.rkt) * Line 13, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`parsers/base.rkt`](../blob/HEAD/parsers/base.rkt) * Line 34, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`observable-operator.rkt`](../blob/HEAD/observable-operator.rkt) * Line 13, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`manager/loot.rkt`](../blob/HEAD/manager/loot.rkt) * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`manager/round-prompts.rkt`](../blob/HEAD/manager/round-prompts.rkt) * Line 13, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`manager/modifier-decks.rkt`](../blob/HEAD/manager/modifier-decks.rkt) * Line 18, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`icons.rkt`](../blob/HEAD/icons.rkt) * Line 14, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 2 fixes to [`foes.rkt`](../blob/HEAD/foes.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 75, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`manager/ability-decks.rkt`](../blob/HEAD/manager/ability-decks.rkt) * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`parsers/monster.rkt`](../blob/HEAD/parsers/monster.rkt) * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`manager/elements.rkt`](../blob/HEAD/manager/elements.rkt) * Line 12, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`scribblings/common.rkt`](../blob/HEAD/scribblings/common.rkt) * Line 14, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 2 fixes to [`manager/state.rkt`](../blob/HEAD/manager/state.rkt) * Line 89, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 423, `if-let-to-cond`: `cond` with internal definitions is preferred over `if` with `let`, to reduce nesting ## Summary Fixed 29 issues in 20 files. * Fixed 21 occurrences of `tidy-require` * Fixed 3 occurrences of `quasiquote-to-list` * Fixed 2 occurrences of `let-to-define` * Fixed 1 occurrence of `predicate/c-migration` * Fixed 1 occurrence of `define-let-to-double-define` * Fixed 1 occurrence of `if-let-to-cond`
jackfirth
reviewed
Oct 19, 2024
Comment on lines
+28
to
+38
(define p (new dc-path%)) | ||
(define path | ||
(let ([p (new dc-path%)]) | ||
(begin0 p | ||
(send* p | ||
(move-to 0 0) | ||
(line-to 0 s) | ||
(line-to r (* 3/2 s)) | ||
(line-to (* 2 r) s) | ||
(line-to (* 2 r) 0) | ||
(line-to r (* -1/2 s)) | ||
(close))))) | ||
(begin0 p | ||
(send* p | ||
(move-to 0 0) | ||
(line-to 0 s) | ||
(line-to r (* 3/2 s)) | ||
(line-to (* 2 r) s) | ||
(line-to (* 2 r) 0) | ||
(line-to r (* -1/2 s)) | ||
(close)))) |
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.
Filed jackfirth/resyntax#375 to improve Resyntax's behavior here.
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.
This is an automated change generated by Resyntax.
Pass 1
Applied 3 fixes to
elements.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.let-to-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.let-to-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.Applied 1 fix to
parsers/foes.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 6 fixes to
aoe-images.rkt
predicate/c-migration
: Thepredicate/c
contract is less clear than a->
contract and no longer improves performance.tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.define-let-to-double-define
: Thislet
expression can be pulled up into adefine
expression.quasiquote-to-list
: This quasiquotation is equialent to a simplelist
call.quasiquote-to-list
: This quasiquotation is equialent to a simplelist
call.quasiquote-to-list
: This quasiquotation is equialent to a simplelist
call.Applied 1 fix to
manager/db.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
syntax/monsters.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
manager/transition.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
curlique.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
loot-cards.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
parsers/base.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
observable-operator.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
manager/loot.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
manager/round-prompts.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
manager/modifier-decks.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
icons.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 2 fixes to
foes.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
manager/ability-decks.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
parsers/monster.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
manager/elements.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
scribblings/common.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 2 fixes to
manager/state.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.if-let-to-cond
:cond
with internal definitions is preferred overif
withlet
, to reduce nestingSummary
Fixed 29 issues in 20 files.
tidy-require
quasiquote-to-list
let-to-define
predicate/c-migration
define-let-to-double-define
if-let-to-cond