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

Merged
merged 1 commit into from
Oct 19, 2024
Merged

Automated Resyntax fixes #106

merged 1 commit into from
Oct 19, 2024

Conversation

resyntax-ci[bot]
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Oct 19, 2024

This is an automated change generated by Resyntax.

Pass 1

Applied 3 fixes to elements.rkt

  • Line 20, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.
  • Line 124, let-to-define: Internal definitions are recommended instead of let expressions, to reduce nesting.
  • Line 201, let-to-define: Internal definitions are recommended instead of let expressions, to reduce nesting.

Applied 1 fix to parsers/foes.rkt

  • Line 16, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 6 fixes to aoe-images.rkt

  • Line 15, predicate/c-migration: The predicate/c contract is less clear than a -> contract and no longer improves performance.
  • Line 19, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.
  • Line 28, define-let-to-double-define: This let expression can be pulled up into a define expression.
  • Line 91, quasiquote-to-list: This quasiquotation is equialent to a simple list call.
  • Line 92, quasiquote-to-list: This quasiquotation is equialent to a simple list call.
  • Line 105, quasiquote-to-list: This quasiquotation is equialent to a simple list call.

Applied 1 fix to manager/db.rkt

  • Line 8, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to syntax/monsters.rkt

  • Line 24, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to manager/transition.rkt

  • Line 9, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to curlique.rkt

  • Line 12, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to loot-cards.rkt

  • Line 13, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to parsers/base.rkt

  • Line 34, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to observable-operator.rkt

  • Line 13, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to manager/loot.rkt

  • Line 16, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to manager/round-prompts.rkt

  • Line 13, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to manager/modifier-decks.rkt

  • Line 18, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to icons.rkt

  • Line 14, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 2 fixes to foes.rkt

  • Line 7, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.
  • Line 75, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to manager/ability-decks.rkt

  • Line 16, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to parsers/monster.rkt

  • Line 16, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to manager/elements.rkt

  • Line 12, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 1 fix to scribblings/common.rkt

  • Line 14, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.

Applied 2 fixes to manager/state.rkt

  • Line 89, tidy-require: Keep imports in require sorted and grouped by phase, with collections before files.
  • Line 423, if-let-to-cond: cond with internal definitions is preferred over if with let, to reduce nesting

Summary

Fixed 29 issues in 20 files.

  • Fixed 21 occurrences of tidy-require
  • Fixed 3 occurrences of quasiquote-to-list
  • Fixed 2 occurrences of let-to-define
  • Fixed 1 occurrence of predicate/c-migration
  • Fixed 1 occurrence of define-let-to-double-define
  • Fixed 1 occurrence of if-let-to-cond

This is an automated change generated by Resyntax.

#### Pass 1

Applied 3 fixes to [`elements.rkt`](../blob/HEAD/elements.rkt)

  * Line 20, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
  * Line 124, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.
  * Line 201, `let-to-define`: Internal definitions are recommended instead of `let` expressions, to reduce nesting.

Applied 1 fix to [`parsers/foes.rkt`](../blob/HEAD/parsers/foes.rkt)

  * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 6 fixes to [`aoe-images.rkt`](../blob/HEAD/aoe-images.rkt)

  * Line 15, `predicate/c-migration`: The `predicate/c` contract is less clear than a `->` contract and no longer improves performance.
  * Line 19, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
  * Line 28, `define-let-to-double-define`: This `let` expression can be pulled up into a `define` expression.
  * Line 91, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call.
  * Line 92, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call.
  * Line 105, `quasiquote-to-list`: This quasiquotation is equialent to a simple `list` call.

Applied 1 fix to [`manager/db.rkt`](../blob/HEAD/manager/db.rkt)

  * Line 8, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`syntax/monsters.rkt`](../blob/HEAD/syntax/monsters.rkt)

  * Line 24, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`manager/transition.rkt`](../blob/HEAD/manager/transition.rkt)

  * Line 9, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`curlique.rkt`](../blob/HEAD/curlique.rkt)

  * Line 12, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`loot-cards.rkt`](../blob/HEAD/loot-cards.rkt)

  * Line 13, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`parsers/base.rkt`](../blob/HEAD/parsers/base.rkt)

  * Line 34, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`observable-operator.rkt`](../blob/HEAD/observable-operator.rkt)

  * Line 13, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`manager/loot.rkt`](../blob/HEAD/manager/loot.rkt)

  * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`manager/round-prompts.rkt`](../blob/HEAD/manager/round-prompts.rkt)

  * Line 13, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`manager/modifier-decks.rkt`](../blob/HEAD/manager/modifier-decks.rkt)

  * Line 18, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`icons.rkt`](../blob/HEAD/icons.rkt)

  * Line 14, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 2 fixes to [`foes.rkt`](../blob/HEAD/foes.rkt)

  * Line 7, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
  * Line 75, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`manager/ability-decks.rkt`](../blob/HEAD/manager/ability-decks.rkt)

  * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`parsers/monster.rkt`](../blob/HEAD/parsers/monster.rkt)

  * Line 16, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`manager/elements.rkt`](../blob/HEAD/manager/elements.rkt)

  * Line 12, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 1 fix to [`scribblings/common.rkt`](../blob/HEAD/scribblings/common.rkt)

  * Line 14, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.

Applied 2 fixes to [`manager/state.rkt`](../blob/HEAD/manager/state.rkt)

  * Line 89, `tidy-require`: Keep imports in `require` sorted and grouped by phase, with collections before files.
  * Line 423, `if-let-to-cond`: `cond` with internal definitions is preferred over `if` with `let`, to reduce nesting

## Summary

Fixed 29 issues in 20 files.

  * Fixed 21 occurrences of `tidy-require`
  * Fixed 3 occurrences of `quasiquote-to-list`
  * Fixed 2 occurrences of `let-to-define`
  * Fixed 1 occurrence of `predicate/c-migration`
  * Fixed 1 occurrence of `define-let-to-double-define`
  * Fixed 1 occurrence of `if-let-to-cond`
@benknoble benknoble merged commit 3a47e06 into main Oct 19, 2024
3 checks passed
@benknoble benknoble deleted the autofix-3-1 branch October 19, 2024 14:40
Comment on lines +28 to +38
(define p (new dc-path%))
(define path
(let ([p (new dc-path%)])
(begin0 p
(send* p
(move-to 0 0)
(line-to 0 s)
(line-to r (* 3/2 s))
(line-to (* 2 r) s)
(line-to (* 2 r) 0)
(line-to r (* -1/2 s))
(close)))))
(begin0 p
(send* p
(move-to 0 0)
(line-to 0 s)
(line-to r (* 3/2 s))
(line-to (* 2 r) s)
(line-to (* 2 r) 0)
(line-to r (* -1/2 s))
(close))))
Copy link
Contributor

Choose a reason for hiding this comment

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

Filed jackfirth/resyntax#375 to improve Resyntax's behavior here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants