Skip to content

Commit

Permalink
Automated Resyntax fixes (#698)
Browse files Browse the repository at this point in the history
* Fix 1 occurrence of `tidy-require`

Keep imports in `require` sorted and grouped by phase, with collections before files.

* Fix 1 occurrence of `when-expression-in-for-loop-to-when-keyword`

Use the `#:when` keyword instead of `when` to reduce loop body indentation.

* Fix 1 occurrence of `hash-ref-with-constant-lambda-to-hash-ref-without-lambda`

The lambda can be removed from the failure result in this `hash-ref` expression.

* Fix 8 occurrences of `let-to-define`

Internal definitions are recommended instead of `let` expressions, to reduce nesting.

* Fix 3 occurrences of `hash-set!-ref-to-hash-update!`

This expression can be replaced with a simpler, equivalent `hash-update!` expression.

* Fix 2 occurrences of `if-else-false-to-and`

This `if` expression can be refactored to an equivalent expression using `and`.

* Fix 2 occurrences of `if-let-to-cond`

`cond` with internal definitions is preferred over `if` with `let`, to reduce nesting

* Fix 1 occurrence of `nested-for-to-for*`

These nested `for` loops can be replaced by a single `for*` loop.

* Fix 1 occurrence of `cond-let-to-cond-define`

Internal definitions are recommended instead of `let` expressions, to reduce nesting.

---------

Co-authored-by: resyntax-ci[bot] <181813515+resyntax-ci[bot]@users.noreply.github.com>
  • Loading branch information
resyntax-ci[bot] authored Nov 24, 2024
1 parent 2a7ee9f commit dfcea1f
Showing 1 changed file with 270 additions and 285 deletions.
Loading

0 comments on commit dfcea1f

Please sign in to comment.