-
-
Notifications
You must be signed in to change notification settings - Fork 103
Automated Resyntax fixes #1398
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 #1398
Conversation
This is an automated change generated by Resyntax. #### Pass 1 Applied 2 fixes to [`typed-racket-lib/typed-racket/env/type-alias-helper.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/env/type-alias-helper.rkt) * Line 5, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 307, `inline-unnecessary-define`: This variable is returned immediately and can be inlined. Applied 1 fix to [`typed-racket-lib/typed-racket/env/signature-env.rkt`](../blob/HEAD/typed-racket-lib/typed-racket/env/signature-env.rkt) * Line 13, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. Applied 5 fixes to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. * Line 32, `inline-unnecessary-define`: This variable is returned immediately and can be inlined. * Line 52, `always-throwing-if-to-when`: Using `when` and `unless` is simpler than a conditional with an always-throwing branch. * Line 61, `cond-let-to-cond-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. * Line 82, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting. #### Pass 2 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 3 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 4 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 5 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 6 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 7 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 8 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 9 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. #### Pass 10 Applied 1 fix to [`typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt`](../blob/HEAD/typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt) * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files. ## Summary Fixed 17 issues in 3 files. * Fixed 12 occurrences of `tidy-require` * Fixed 2 occurrences of `inline-unnecessary-define` * Fixed 1 occurrence of `always-throwing-if-to-when` * Fixed 1 occurrence of `cond-let-to-cond-define` * Fixed 1 occurrence of `let-to-define`
(require racket/list | ||
racket/pretty | ||
racket/set | ||
rackunit | ||
syntax/parse | ||
(only-in racket/format ~a) | ||
(only-in syntax/modread with-module-reading-parameterization) | ||
"../test-utils.rkt") |
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 require form seemed to trip up Resyntax for some reason. The output looks nice, but Resyntax ran 10 passes and kept repeatedly trying to tidy these requires. Not sure what's up with that.
This is good, but I think I'd prefer significantly larger PRs from resyntax rather than doing this a lot of times. |
Noted, I'll send a PR to bump up the limits. |
This is an automated change generated by Resyntax.
Pass 1
Applied 2 fixes to
typed-racket-lib/typed-racket/env/type-alias-helper.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.inline-unnecessary-define
: This variable is returned immediately and can be inlined.Applied 1 fix to
typed-racket-lib/typed-racket/env/signature-env.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 5 fixes to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.inline-unnecessary-define
: This variable is returned immediately and can be inlined.always-throwing-if-to-when
: Usingwhen
andunless
is simpler than a conditional with an always-throwing branch.cond-let-to-cond-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.let-to-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.Pass 2
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 3
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 4
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 5
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 6
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 7
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 8
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 9
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 10
Applied 1 fix to
typed-racket-test/unit-tests/shallow-rewrite-expansion/main.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Summary
Fixed 17 issues in 3 files.
tidy-require
inline-unnecessary-define
always-throwing-if-to-when
cond-let-to-cond-define
let-to-define