resyntax icon indicating copy to clipboard operation
resyntax copied to clipboard

A Racket refactoring engine

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

The current comment parsing code in Resyntax is specific to `#lang racket`, incomplete, and irritating to maintain. Resyntax should use `module-lexer` to find comment locations in the file. This will...

enhancement

In order to make things like #185 easier to implement, it would be handy if refactoring rules could look up binding info for identifiers. This ought to be possible by...

enhancement

Resyntax ought to suggest rewriting this code: ```scheme (define (quote x) (* x 2)) 'a ``` Into this: ```scheme (define (quote x) (* x 2)) (quote a) ``` That is,...

new lint

Resyntax should be able to refactor more than just `#lang racket` and `#lang racket/base` code. For example, Resyntax should be able to rewrite this: ``` #lang rhombus (1 + 2)...

enhancement

The `apply-append-for-loop-to-for-loop` lint seems to, in some cases, result in much uglier code. For example, [in Herbie](https://github.com/herbie-fp/herbie/pull/1096/files/b408c651730f5a7b23cad59507f49f585bdf9ff0#r1886087133), it rewrites: ``` ,@(apply append (for/list ([rows (append mainline-infos other-infos)]) (print-rows rows #:name...

existing lint

[This suggestion](https://github.com/Bogdanp/racket-sentry/pull/1/files#diff-ad73206235863982e1c159370b73068636233ac25168f41b116f9f043af662b6R3-R11) conflicts with [this racket-review rule](https://github.com/Bogdanp/racket-review/blob/5e0ed770fc7c649e1d5164a4815136c526780fa7/lint.rkt#L797-L835) which ensures that uses of require subforms sort according to their module path. Another example can be found [here](https://github.com/Bogdanp/racket-http-easy/pull/30/files#diff-d2e2ed902fe12e272acb437a29942ed4cbc60337aac1082e2011f2339d0ff61eL3-L6).

bug
existing lint

Sometimes a suggestion from Resyntax makes sense generally, but is unhelpful in a specific context. See [this comment](https://github.com/Bogdanp/racket-http-easy/pull/30/files/6690e51947dfa0eb9662c6b57d3cacaae0383507#r1879921673) for an example. Currently, this situation requires users to repeatedly ignore Autofixer...

enhancement
existing lint
autopilot-candidate

The `define-lambda-to-define` rule works on both ordinary `(define id (lambda ...))` forms and also `(define (func ...) (lambda ...))` forms. But the rule description is written assuming it's for the...

existing lint

The `for/last` form evaluates the loop body every iteration, even though it often only needs to evaluate it on the last iteration. This is very wasteful when the loop body...

new lint