resyntax
resyntax copied to clipboard
New rule: `unnecessary-default-recommendations`
Rule summary
In #lang resyntax/test, the default behavior when no refactoring suite is specified with require: is to use default-recommendations. Therefore, a test file whose only require: statement is require: resyntax/default-recommendations default-recommendations can be omitted.
Test case
#lang resyntax/test
test: "default-recommendations import can be removed"
|--------------------
| #lang resyntax/test
| require: resyntax/default-recommendations default-recommendations
| header: - #lang racket
| test: "some test"
| - (and a (and b c))
| - (and a b c)
|====================
| #lang resyntax/test
| header: - #lang racket
| test: "some test"
| - (and a (and b c))
| - (and a b c)
|--------------------
No-change test case
#lang resyntax/test
no-change-test: "default recommendations import not removed when other imports present"
|--------------------
| #lang resyntax/test
| require: resyntax/default-recommendations default-recommendations
| require: resyntax/default-recommendations boolean-shortcuts
| header: - #lang racket
| test: "some test"
| - (and a (and b c))
| - (and a b c)
|--------------------
Additional context
This relies on #587. The test cases above use the code block syntax proposed in that issue.