-
-
Notifications
You must be signed in to change notification settings - Fork 95
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 #466
base: master
Are you sure you want to change the base?
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.
Resyntax fixed 20 issues in 10 files.
tidy-require
let-to-define
always-throwing-if-to-when
if-let-to-cond
cond-else-cond-to-cond
define-syntax-syntax-rules-to-define-syntax-rule
cond-let-to-cond-define
inline-unnecessary-begin
when-expression-in-for-loop-to-when-keyword
map-to-for