Skip to content

Commit

Permalink
Fix tidy-require handling of non-phase forms (#312)
Browse files Browse the repository at this point in the history
Closes #306.
  • Loading branch information
jackfirth authored Sep 19, 2024
1 parent 1675e0a commit ac406cf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion default-recommendations/require-and-provide-suggestions-test.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ test: "require tidying sorts for-syntax before plain"
----------------------------------------


test: "require tidying should move non-phase spec forms to the end"
test: "require tidying should move non-phase spec forms after collections"
----------------------------------------
(require (only-in racket/list first)
(only-in racket/list second)
Expand All @@ -110,3 +110,18 @@ test: "require tidying should move non-phase spec forms to the end"
(only-in racket/list second)
(prefix-in s: racket/string))
----------------------------------------


test: "require tidying should move non-phase spec forms before relative paths"
----------------------------------------
(require "require-and-provide-suggestions.rkt"
(only-in racket/list first)
(only-in racket/list second)
(prefix-in s: racket/string))
----------------------------------------
----------------------------------------
(require (only-in racket/list first)
(only-in racket/list second)
(prefix-in s: racket/string)
"require-and-provide-suggestions.rkt")
----------------------------------------
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@


(define phase-form<=> (comparator-of-constants 'for-syntax 'for-template 'for-label 'for-meta 'plain))
(define import-kind<=> (comparator-of-constants 'collection 'file 'other))
(define import-kind<=> (comparator-of-constants 'collection 'other 'file))


(define (false-last<=> cmp)
Expand Down

0 comments on commit ac406cf

Please sign in to comment.