-
-
Notifications
You must be signed in to change notification settings - Fork 104
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 #1412
Open
resyntax-ci
wants to merge
13
commits into
master
Choose a base branch
from
autofix-11-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Automated Resyntax fixes #1412
+241
−234
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
Keep imports in `require` sorted and grouped by phase, with collections before files.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
This negated `when` expression can be replaced by an `unless` expression.
The `define` form supports a shorthand for defining functions.
The `apply` function accepts single arguments in addition to a trailing list argument.
This `if` expression can be refactored to an equivalent expression using `and`.
This `match` expression can be simplified using `match-define`.
Using `cond` instead of `if` here makes `begin` unnecessary
This `case-lambda` form only has one case. Use a regular lambda instead.
The `syntax-disarm` function is a legacy function that does nothing.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
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.
WARNING: Missing test for base type 'Positive-Single-Flonum'
WARNING: Missing test for base type '∪'
WARNING: Missing test for base type 'Single-Flonum'
WARNING: Missing test for base type 'Intersection'
WARNING: Missing test for base type 'Inexact-Imaginary'
WARNING: Missing test for base type 'Single-Flonum-Complex'
WARNING: Missing test for base type 'Union'
WARNING: Missing test for base type 'Single-Flonum-Zero'
WARNING: Missing test for base type 'ExtFlVector'
WARNING: Missing test for base type '∩'
WARNING: Missing test for base type 'ExtFlonum-Positive-Zero'
WARNING: Missing test for base type 'Nonpositive-ExtFlonum'
WARNING: Missing test for base type 'Place'
WARNING: Missing test for base type 'U'
WARNING: Missing test for base type 'ExtFlonum-Zero'
WARNING: Missing test for base type 'Internal-Definition-Context'
WARNING: Missing test for base type 'Read-Table'
WARNING: Missing test for base type 'Un'
WARNING: Missing test for base type 'Negative-Single-Flonum'
WARNING: Missing test for base type 'Unquoted-Printing-String'
WARNING: Missing test for base type 'Negative-ExtFlonum'
WARNING: Missing test for base type 'Single-Flonum-Negative-Zero'
WARNING: Missing test for base type 'Single-Flonum-Positive-Zero'
WARNING: Missing test for base type 'ExtFlonum'
WARNING: Missing test for base type 'Nonnegative-Single-Flonum'
WARNING: Missing test for base type 'ExtFlonum-Nan'
WARNING: Missing test for base type 'ExtFlonum-Negative-Zero'
WARNING: Missing test for base type 'Single-Flonum-Nan'
WARNING: Missing test for base type 'Positive-ExtFlonum'
WARNING: Missing test for base type 'Nonnegative-ExtFlonum'
WARNING: Missing test for base type 'Nonpositive-Single-Flonum'
This is an automated change generated by Resyntax.
Pass 1
Applied 3 fixes to
typed-racket-lib/typed-racket/types/signatures.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 6 fixes to
typed-racket-lib/typed-racket/types/base-abbrev.rkt
define-syntax-syntax-rules-to-define-syntax-rule
: Thisdefine-syntax
macro can be replaced with a simpler, equivalentdefine-syntax-rule
macro.define-syntax-syntax-rules-to-define-syntax-rule
: Thisdefine-syntax
macro can be replaced with a simpler, equivalentdefine-syntax-rule
macro.define-syntax-syntax-rules-to-define-syntax-rule
: Thisdefine-syntax
macro can be replaced with a simpler, equivalentdefine-syntax-rule
macro.define-syntax-syntax-rules-to-define-syntax-rule
: Thisdefine-syntax
macro can be replaced with a simpler, equivalentdefine-syntax-rule
macro.define-syntax-syntax-rules-to-define-syntax-rule
: Thisdefine-syntax
macro can be replaced with a simpler, equivalentdefine-syntax-rule
macro.define-syntax-syntax-rules-to-define-syntax-rule
: Thisdefine-syntax
macro can be replaced with a simpler, equivalentdefine-syntax-rule
macro.Applied 1 fix to
typed-racket-test/succeed/pr575-variation-3.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 2 fixes to
typed-racket-lib/typed-racket/core.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.inverted-when
: This negatedwhen
expression can be replaced by anunless
expression.Applied 1 fix to
typed-racket-test/succeed/tr-evt.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-test/succeed/pr14829.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 2 fixes to
typed-racket-lib/typed-racket/types/generalize.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/private/no-check-helper.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-test/succeed/opaque-object-name.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 3 fixes to
typed-racket-lib/typed-racket/types/utils.rkt
define-lambda-to-define
: Thedefine
form supports a shorthand for defining functions.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
typed-racket-test/succeed/type-printer-single-level.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 1 fix to
typed-racket-lib/typed-racket/types/overlap.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 3 fixes to
typed-racket-lib/typed-racket/types/subtype.rkt
apply-flattening
: Theapply
function accepts single arguments in addition to a trailing list argument.if-else-false-to-and
: Thisif
expression can be refactored to an equivalent expression usingand
.single-clause-match-to-match-define
: Thismatch
expression can be simplified usingmatch-define
.Applied 1 fix to
typed-racket-test/succeed/opaque-object-stronger.rkt
let-to-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.Applied 1 fix to
typed-racket-test/succeed/vector-contract.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 2 fixes to
typed-racket-lib/typed-racket/tc-setup.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.if-begin-to-cond
: Usingcond
instead ofif
here makesbegin
unnecessaryApplied 1 fix to
typed-racket-test/succeed/hash-contract.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Applied 4 fixes to
typed-racket-lib/typed-racket/typed-reader.rkt
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.let-to-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.case-lambda-with-single-case-to-lambda
: Thiscase-lambda
form only has one case. Use a regular lambda instead.Applied 2 fixes to
typed-racket-lib/typed/private/rewriter.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.syntax-disarm-migration
: Thesyntax-disarm
function is a legacy function that does nothing.Applied 1 fix to
typed-racket-test/succeed/check-env-lang-based-env.rkt
tidy-require
: Keep imports inrequire
sorted and grouped by phase, with collections before files.Pass 2
Applied 2 fixes to
typed-racket-lib/typed-racket/typed-reader.rkt
let-to-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.cond-let-to-cond-define
: Internal definitions are recommended instead oflet
expressions, to reduce nesting.Summary
Fixed 40 issues in 20 files.
tidy-require
let-to-define
define-syntax-syntax-rules-to-define-syntax-rule
single-clause-match-to-match-define
case-lambda-with-single-case-to-lambda
inverted-when
if-begin-to-cond
apply-flattening
define-lambda-to-define
cond-let-to-cond-define
syntax-disarm-migration
if-else-false-to-and