resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

A Racket refactoring engine

Results 65 resyntax issues
Sort by recently updated
recently updated
newest added

How should `resyntax` surface suggestions to users? I can think of several possibilities: - A DrRacket plugin that shows you suggestions for the current file. Maybe something similar for `racket-mode`,...

enhancement
help wanted

Many macros written in terms of `define-syntax` and `syntax-parse` can be simplified to use `define-syntax-parse-rule`. Resyntax should suggest rewriting these macros, as `define-syntax-parse-rule` macros have a lot less boilerplate and...

new lint

Saw [this code](https://github.com/jackfirth/yaragg/commit/9d48ab7152003e39aa6c1bab11a601d3723143fa#diff-dc70b3329cf8b1b6ea61529383803830acc294f93a8552442d7c669767060b81R118) today: ```scheme (λ () (define t (get-token-grammar i)) t) ``` The `t` variable is immediately returned and therefore useless. This can be refactored to just: `(λ ()...

new lint

This code: ```scheme (for ([x (in-range a (add1 b))]) body ...) ``` Can be refactored to this: ```scheme (for ([x (in-inclusive-range a b)]) body ...) ``` See this discussion with...

new lint

The expression `(sequence-tail (in-vector vec) i)` can be rewritten to `(in-vector vec i)`.

new lint

See first commit message below.

It would be nice to have an interactive fix mode, that would allow for applying rules selectively, and avoid cognitive overload by letting the user focus on changes one by...

enhancement

```racket (read-comment-locations (open-input-string "(list #;abc z #| c d |# \"#;efg\" ; ijk \n l m) ")) # ``` but this should return instead 3 comment ranges (0-indexed): [6, 11),...

bug

Saw this code today: ```scheme (display size) (display "\n") ``` That can just be `(displayln size)`. Catching this is tricky because it's kind of a splicing pattern, rather than a...

new lint

Here are some ideas for using resyntax on Typed Racket code. These are quite superficial and don't depend on any knowledge of the types. + Singleton union types: rewrite the...

new lint