-
-
Notifications
You must be signed in to change notification settings - Fork 102
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 #1400
Automated Resyntax fixes #1400
Conversation
This is an automated change generated by Resyntax. #### Pass 1 Applied 2 fixes to [`typed-racket-lib/typed-racket/optimizer/optimizer.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/optimizer.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 92, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. Applied 2 fixes to [`typed-racket-lib/typed-racket/optimizer/pair.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/pair.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 77, `datum->syntax-migration`: The fifth argument to `datum->syntax` is ignored. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/vector.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/vector.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 2 fixes to [`typed-racket-lib/typed-racket/optimizer/fixnum.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/fixnum.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 127, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. Applied 2 fixes to [`typed-racket-lib/typed-racket/optimizer/float.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/float.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 139, `or-in-for/and-to-filter-clause`: The `or` expression in this `for` loop can be replaced by a filtering clause. Applied 2 fixes to [`typed-racket-lib/typed-racket/optimizer/float-complex.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/float-complex.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 85, `if-let-to-cond`: `cond` with internal definitions is preferred over `if` with `let`, to reduce nesting Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/struct.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/struct.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/unboxed-tables.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/unboxed-tables.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/list.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/list.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/number.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/number.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/box.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/box.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/hidden-costs.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/hidden-costs.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/numeric-utils.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/numeric-utils.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 3 fixes to [`typed-racket-lib/typed-racket/optimizer/logging.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/logging.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 93, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. * Line 104, `map-to-for`: This `map` operation can be replaced with a `for/list` loop. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/dead-code.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/dead-code.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/apply.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/apply.rkt) * Line 2, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/extflonum.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/extflonum.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 2 fixes to [`typed-racket-lib/typed-racket/optimizer/utils.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/utils.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 53, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/string.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/string.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 1 fix to [`typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt) * Line 3, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. ## Summary Fixed 28 issues in 20 files. * Fixed 20 occurrences of `tidy-require` * Fixed 4 occurrences of `let-to-define` * Fixed 1 occurrence of `datum->syntax-migration` * Fixed 1 occurrence of `or-in-for/and-to-filter-clause` * Fixed 1 occurrence of `if-let-to-cond` * Fixed 1 occurrence of `map-to-for`
(for/list ([irritant (in-list (sort irritants | ||
< | ||
#:key (lambda (x) (or (syntax-position x) 0))))]) | ||
(let ([irritant (locate-stx irritant)]) |
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.
Shouldn't this become a define
?
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.
No, it's shadowing the irritant
loop variable.
(define new-o | ||
(mark-as-non-float (quasisyntax/loc this-syntax | ||
(#,op #,(or o-nf o) #,(or c1-nf c1))))) | ||
(if (stx-null? (stx-cdr cs)) new-o (loop new-o (stx-cdr cs)))] |
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.
This should not be collapsed to one line with the fmt
PR that @9999years is proposing.
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 20 files in this pull request and found no issues.
This is an automated change generated by Resyntax.
Pass 1
Applied 2 fixes to
typed-racket-lib/typed-racket/optimizer/optimizer.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.Applied 2 fixes to
typed-racket-lib/typed-racket/optimizer/pair.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.datum->syntax-migration
: The fifth argument todatum->syntax
is ignored.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/vector.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 2 fixes to
typed-racket-lib/typed-racket/optimizer/fixnum.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.Applied 2 fixes to
typed-racket-lib/typed-racket/optimizer/float.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.or-in-for/and-to-filter-clause
: Theor
expression in thisfor
loop can be replaced by a filtering clause.Applied 2 fixes to
typed-racket-lib/typed-racket/optimizer/float-complex.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 nestingApplied 1 fix to
typed-racket-lib/typed-racket/optimizer/struct.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/unboxed-tables.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/list.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/number.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/box.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/hidden-costs.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/numeric-utils.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 3 fixes to
typed-racket-lib/typed-racket/optimizer/logging.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.map-to-for
: Thismap
operation can be replaced with afor/list
loop.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/dead-code.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/apply.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/extflonum.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 2 fixes to
typed-racket-lib/typed-racket/optimizer/utils.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.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/string.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Summary
Fixed 28 issues in 20 files.
tidy-require
let-to-define
datum->syntax-migration
or-in-for/and-to-filter-clause
if-let-to-cond
map-to-for