Skip to content

Conversation

@resyntax-ci
Copy link
Contributor

@resyntax-ci resyntax-ci bot commented Apr 23, 2025

Resyntax fixed 20 issues in 8 files.

  • Fixed 4 occurrences of map-to-for
  • Fixed 3 occurrences of let-to-define
  • Fixed 2 occurrences of read-line-any
  • Fixed 2 occurrences of unless-expression-in-for-loop-to-unless-keyword
  • Fixed 2 occurrences of cond-let-to-cond-define
  • Fixed 2 occurrences of for-each-to-for
  • Fixed 1 occurrence of if-let-to-cond
  • Fixed 1 occurrence of define-syntax-syntax-rules-to-define-syntax-rule
  • Fixed 1 occurrence of if-begin-to-cond
  • Fixed 1 occurrence of or-cond-to-cond
  • Fixed 1 occurrence of inverted-when

resyntax-ci bot added 11 commits April 23, 2025 00:16
Specify a line mode of `'any` with `read-line` to avoid differences between Windows and other platforms.
Use the `#:unless` keyword instead of `unless` to reduce loop body indentation.
Internal definitions are recommended instead of `let` expressions, to reduce nesting.
This `map` operation can be replaced with a `for/list` loop.
This `for-each` operation can be replaced with a `for` loop.
Using `cond` instead of `if` here makes `begin` unnecessary
This `define-syntax` macro can be replaced with a simpler, equivalent `define-syntax-rule` macro.
`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 `or` expression can be turned into a clause of the inner `cond` expression, reducing nesting.
This negated `when` expression can be replaced by an `unless` expression.
Comment on lines -97 to +100
[title (or (attribute title)
(cond
[(= 1 (length (syntax->list #'(form ...))))
#'example-title]
[else #'examples-title]))])
[title (cond
[(attribute title) #t]
[(= 1 (length (syntax->list #'(form ...)))) #'example-title]
[else #'examples-title])])
Copy link
Contributor

Choose a reason for hiding this comment

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

This change is buggy. If (attribute title) returns a non-#f and non-#t value, this change coerces it to #t.

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.

2 participants