-
-
Notifications
You must be signed in to change notification settings - Fork 99
Automated Resyntax fixes #466
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
Conversation
The `else` clause of this `cond` expression is another `cond` expression and can be flattened.
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 `map` operation can be replaced with a `for/list` loop.
This `begin` form can be flattened into the surrounding definition context.
This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
Use the `#:when` keyword instead of `when` to reduce loop body indentation.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
| (raise exn)) | ||
| (void))]) | ||
| (define v (read log-file)) | ||
| (if (eof-object? 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.
Shouldn't this be converted to cond to allow further refactoring? Or does it hit the limit? @jackfirth
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 let expression in the if body isn't refactorable, since it has a [v (deserialize v)] clause.
|
Closing in favor of newer automated fixes. |
Resyntax fixed 20 issues in 10 files.
tidy-requirelet-to-definealways-throwing-if-to-whenif-let-to-condcond-else-cond-to-conddefine-syntax-syntax-rules-to-define-syntax-rulecond-let-to-cond-defineinline-unnecessary-beginwhen-expression-in-for-loop-to-when-keywordmap-to-for