Skip to content

Conversation

@resyntax-ci
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Jan 15, 2025

Resyntax fixed 20 issues in 7 files.

  • Fixed 5 occurrences of map-to-for
  • Fixed 4 occurrences of let-to-define
  • Fixed 2 occurrences of provide/contract-to-contract-out
  • Fixed 1 occurrence of if-let-to-cond
  • Fixed 1 occurrence of quasiquote-to-list
  • Fixed 1 occurrence of make-temporary-directory-migration
  • Fixed 1 occurrence of or-hash-ref-set!-to-hash-ref!
  • Fixed 1 occurrence of cond-let-to-cond-define
  • Fixed 1 occurrence of arrow-contract-with-rest-to-arrow-contract-with-ellipses
  • Fixed 1 occurrence of string-append-and-string-join-to-string-join
  • Fixed 1 occurrence of define-syntax-syntax-rules-to-define-syntax-rule
  • Fixed 1 occurrence of always-throwing-if-to-when

resyntax-ci bot added 12 commits January 15, 2025 00:16
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `map` operation can be replaced with a `for/list` loop.
This expression can be replaced with a simpler, equivalent `hash-ref!` expression.
This use of `string-append` can be removed by using `string-join`'s keyword arguments.
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
This quasiquotation is equialent to a simple `list` call.
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.
The `provide/contract` form is a legacy form made obsolete by `contract-out`.
…ellipses`

This `->*` contract can be rewritten using `->` with ellipses.
Use `make-temporary-directory` to make directories instead of `make-temporary-file`.
null)
(if date `(" " ,@(decode-content (list date)) ".") null)
(if url `(" " ,(link url (tt url))) null)
(if url (list " "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is bad...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jackfirth I think this occurs because Resyntax invokes range formatting on only the subexpression, so it doesn't format the entire if expression...

(Actually fmt ideally should collapse (list " " (link url (tt url))) into one line, circumventing this issue, but without shadowing, link is a special form that should be formatted vertically, so that's why fmt introduces a newline)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's definitely the cause. I'm not sure how to fix it from the Resyntax side.

@mflatt
Copy link
Member

mflatt commented Jun 26, 2025

Closing in favor of newer automated fixes.

@mflatt mflatt closed this Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants