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

Closed
wants to merge 5 commits into from
Closed

Automated Resyntax fixes #30

wants to merge 5 commits into from

Conversation

resyntax-ci[bot]
Copy link
Contributor

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

Resyntax fixed 7 issues in 6 files.

  • Fixed 3 occurrences of false/c-migration
  • Fixed 1 occurrence of zero-comparison-to-positive?
  • Fixed 1 occurrence of define-lambda-to-define
  • Fixed 1 occurrence of tidy-require
  • Fixed 1 occurrence of if-else-false-to-and

`false/c` is an alias for `#f` that exists for backwards compatibility.
The `define` form supports a shorthand for defining functions.
This expression is equivalent to calling the `positive?` predicate.
Keep imports in `require` sorted and grouped by phase, with collections before files.
This `if` expression can be refactored to an equivalent expression using `and`.
racket/contract/base
(prefix-in d: data/pool)
Copy link
Owner

Choose a reason for hiding this comment

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

Gonna skip this one as discussed on Discord and in jackfirth/resyntax#432 .

@@ -126,7 +126,7 @@

(define (is-percent-encoded? s [encode uri-encode])
(define num-%-matches (length (regexp-match* #rx"%" s)))
(or (and (> num-%-matches 0)
(or (and (positive? num-%-matches)
Copy link
Owner

@Bogdanp Bogdanp Dec 11, 2024

Choose a reason for hiding this comment

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

I'm also going to skip this one because I like the visual (conceptual?) "symmetry" of

(and (> x ...)
     (= x ...))

@Bogdanp Bogdanp closed this Dec 11, 2024
@Bogdanp Bogdanp deleted the autofix-5-1 branch December 11, 2024 11:29
@Bogdanp
Copy link
Owner

Bogdanp commented Dec 11, 2024

(This was actually merged, I just dropped two of the commits.)

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.

1 participant