Skip to content

Conversation

@resyntax-ci
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Oct 26, 2025

Resyntax fixed 19 issues in 7 files.

  • Fixed 7 occurrences of let-to-define
  • Fixed 2 occurrences of quasiquote-to-list
  • Fixed 2 occurrences of map-to-for
  • Fixed 2 occurrences of cond-let-to-cond-define
  • Fixed 2 occurrences of string-append-with-format-to-format
  • Fixed 1 occurrence of make-temporary-directory-migration
  • Fixed 1 occurrence of nested-when-to-compound-when
  • Fixed 1 occurrence of inline-unnecessary-begin
  • Fixed 1 occurrence of error-to-raise-arguments-error

resyntax-ci bot added 11 commits October 26, 2025 00:31
Use `make-temporary-directory` to make directories instead of `make-temporary-file`.
Nested `when` expressions can be merged into a single compound `when` expression.
This quasiquotation is equialent to a simple `list` call.
This `begin` form can be flattened into the surrounding definition context.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `map` operation can be replaced with a `for/list` loop.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
Use `raise-arguments-error` instead of `error` for better error messages that follow Racket conventions.
This `string-append` with `format` expression can be simplified to a single `format` call.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `map` operation can be replaced with a `for/list` loop.
(append (sort (send item get-shortcut-prefix) string<=? #:key symbol->string)
(list (send item get-shortcut))))
(hash-update! shortcuts k (λ (v) (cons (send item get-label) v)) '())))

Copy link
Member

Choose a reason for hiding this comment

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

I'm not digging this change; the and seems harder to read, as does new set of line breaks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The line breaks are fmt's doing. As for the when merging, I think I'll try adjusting that rule to only fire if there's three or more nested when forms. That seems more likely to be an improvement when it applies.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I've filed jackfirth/resyntax#639 to address this.

(k gui-thing)])))]))
(error 'find-output-radio-box "could not find `~a' radio box"
label)))
(raise-arguments-error 'find-output-radio-box "could not find `' radio box" "label" label)))
Copy link
Member

Choose a reason for hiding this comment

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

I think this change is incorrect.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see that you have already done something about this, @jackfirth . But also, this isn't a problem with the arguments of the function.

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.

3 participants