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 #1434

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

Automated Resyntax fixes #1434

wants to merge 17 commits into from

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Feb 14, 2025

Resyntax fixed 50 issues in 19 files.

  • Fixed 15 occurrences of single-clause-match-to-match-define
  • Fixed 9 occurrences of define-lambda-to-define
  • Fixed 6 occurrences of let-to-define
  • Fixed 4 occurrences of zero-comparison-to-positive?
  • Fixed 3 occurrences of define-values-values-to-define
  • Fixed 2 occurrences of if-begin-to-cond
  • Fixed 1 occurrence of syntax-disarm-migration
  • Fixed 1 occurrence of if-x-else-x-to-and
  • Fixed 1 occurrence of format-identity
  • Fixed 1 occurrence of if-let-to-cond
  • Fixed 1 occurrence of when-expression-in-for-loop-to-when-keyword
  • Fixed 1 occurrence of define-begin0-extraction
  • Fixed 1 occurrence of inverted-when
  • Fixed 1 occurrence of map-to-for
  • Fixed 1 occurrence of unless-expression-in-for-loop-to-unless-keyword
  • Fixed 1 occurrence of and-match-to-match
  • Fixed 1 occurrence of inline-unnecessary-begin

resyntax-ci bot added 17 commits February 14, 2025 00:35
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting
This `match` expression can be simplified using `match-define`.
This use of `format` does nothing.
Using `cond` instead of `if` here makes `begin` unnecessary
This conditional expression can be replaced with a simpler, equivalent expression.
The `begin0` in this definition can be extracted into the surrounding definition context.
The `define` form supports a shorthand for defining functions.
This `map` operation can be replaced with a `for/list` loop.
The `syntax-disarm` function is a legacy function that does nothing.
This expression is equivalent to calling the `positive?` predicate.
This use of `define-values` is unnecessary.
Use the `#:unless` keyword instead of `unless` to reduce loop body indentation.
Use the `#:when` keyword instead of `when` to reduce loop body indentation.
This `and` expression can be turned into a clause of the inner `match` expression, reducing nesting.
This `begin` form can be flattened into the surrounding definition context.
This negated `when` expression can be replaced by an `unless` expression.
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.

0 participants