Skip to content
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 #462

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Automated Resyntax fixes #462

wants to merge 5 commits into from

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Dec 4, 2024

Resyntax fixed 20 issues in 5 files.

  • Fixed 12 occurrences of let-to-define
  • Fixed 5 occurrences of tidy-require
  • Fixed 1 occurrence of if-let-to-cond
  • Fixed 1 occurrence of define-let-to-double-define
  • Fixed 1 occurrence of always-throwing-if-to-when

resyntax-ci bot added 5 commits December 4, 2024 00:32
Keep imports in `require` sorted and grouped by phase, with collections before files.
`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `let` expression can be pulled up into a `define` expression.
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
(hbl-append
(normal-font "(")
(let loop ([args args])
(let* ([type (car args)]
Copy link
Contributor

Choose a reason for hiding this comment

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

This let* could be turned to define, I think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed. Pretty sure the fix limit is the only thing that stopped Resyntax from addressing it.

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 the fix limit should be somehow less strict so that this stops happening.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, it keeps coming back up. Filed jackfirth/resyntax#429 to track it.

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