From 086c0a663706bc2758a075462c459afe80ff0bc8 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 1/8] Fix 8 occurrences of `tidy-require` Keep imports in `require` sorted and grouped by phase, with collections before files. --- .../tests/drracket/gui-debugger/harness.rkt | 6 +- .../tests/drracket/gui-debugger/in-drr.rkt | 6 +- .../drracket/check-syntax.rkt | 8 +-- .../drracket/find-module-path-completions.rkt | 16 ++--- drracket/drracket/private/unit.rkt | 66 +++++++++---------- drracket/scribblings/drracket/common.rkt | 6 +- .../drracket/make-indentation-table.rkt | 4 +- 7 files changed, 55 insertions(+), 57 deletions(-) diff --git a/drracket-test/tests/drracket/gui-debugger/harness.rkt b/drracket-test/tests/drracket/gui-debugger/harness.rkt index ab1c960ae..2534fa448 100644 --- a/drracket-test/tests/drracket/gui-debugger/harness.rkt +++ b/drracket-test/tests/drracket/gui-debugger/harness.rkt @@ -1,6 +1,8 @@ #lang racket -(require gui-debugger/annotator gui-debugger/load-sandbox syntax/parse - gui-debugger/marks) +(require gui-debugger/annotator + gui-debugger/load-sandbox + gui-debugger/marks + syntax/parse) (provide run-code-with-annotator break/test) ;; Syntax -> Any diff --git a/drracket-test/tests/drracket/gui-debugger/in-drr.rkt b/drracket-test/tests/drracket/gui-debugger/in-drr.rkt index 2f915a523..a49d37b98 100644 --- a/drracket-test/tests/drracket/gui-debugger/in-drr.rkt +++ b/drracket-test/tests/drracket/gui-debugger/in-drr.rkt @@ -1,8 +1,8 @@ #lang racket -(require "../private/drracket-test-util.rkt" +(require racket/gui/base + rackunit (prefix-in fw: framework) - racket/gui/base - rackunit) + "../private/drracket-test-util.rkt") (define (start-debugger-and-run-to-completion drr) (define debug-button diff --git a/drracket-tool-text-lib/drracket/check-syntax.rkt b/drracket-tool-text-lib/drracket/check-syntax.rkt index ed22dccdd..ce5e35ba2 100644 --- a/drracket-tool-text-lib/drracket/check-syntax.rkt +++ b/drracket-tool-text-lib/drracket/check-syntax.rkt @@ -1,11 +1,11 @@ #lang racket/base -(require racket/contract - racket/class +(require racket/class + racket/contract racket/path syntax/modread - "private/syncheck/traversals.rkt" "private/syncheck/syncheck-intf.rkt" - "private/syncheck/syncheck-local-member-names.rkt") + "private/syncheck/syncheck-local-member-names.rkt" + "private/syncheck/traversals.rkt") (provide (contract-out diff --git a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt index 7461aa265..21ac1a1c9 100644 --- a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt +++ b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt @@ -1,12 +1,12 @@ #lang racket/base -(require racket/contract/base - racket/system - racket/port +(require compiler/module-suffix + pkg/lib racket/contract + racket/contract/base racket/list - pkg/lib - compiler/module-suffix) + racket/port + racket/system) (define current-library-collection-links-info/c (listof (or/c #f @@ -296,10 +296,10 @@ [else (use-current-racket 3)])) (module+ test - (require rackunit + (require racket/contract racket/list - racket/contract - racket/match) + racket/match + rackunit) (define/contract find-completions/c (-> string? (listof (list/c string? path?)) (-> path? (listof path?)) (-> path? boolean?) diff --git a/drracket/drracket/private/unit.rkt b/drracket/drracket/private/unit.rkt index e25fa7578..5ba45cbec 100644 --- a/drracket/drracket/private/unit.rkt +++ b/drracket/drracket/private/unit.rkt @@ -1,51 +1,47 @@ #lang racket/base -(require racket/contract - racket/unit - racket/class - racket/path - racket/port - racket/list - racket/match - racket/format - string-constants +(require drracket/get-module-path + drracket/private/drsig + drracket/private/standalone-module-browser framework + framework/private/aspell + framework/private/logging-timer framework/private/srcloc-panel - mrlib/name-message - mrlib/switchable-button + mred mrlib/cache-image-snip - (prefix-in image-core: mrlib/image-core) mrlib/close-icon + mrlib/name-message mrlib/panel-wob + mrlib/switchable-button + mzlib/date net/sendurl net/url - - drracket/private/drsig - drracket/private/standalone-module-browser - "insulated-read-language.rkt" - "insert-large-letters.rkt" - "get-defs.rkt" - "local-member-names.rkt" - "eval-helpers-and-pref-init.rkt" - "parse-logger-args.rkt" - drracket/get-module-path - "named-undefined.rkt" + racket/class + racket/contract + racket/format + racket/list + racket/match + racket/path + racket/port + racket/unit + scribble/tag + scribble/xref + setup/collects + setup/xref + string-constants + (prefix-in image-core: mrlib/image-core) (prefix-in pict-snip: "pict-snip.rkt") (prefix-in drracket:arrow: "../arrow.rkt") (prefix-in icons: images/compile-time) - mred (prefix-in mred: mred) - - mzlib/date - - framework/private/aspell - framework/private/logging-timer - - setup/collects - scribble/xref - setup/xref - scribble/tag - (only-in scribble/base doc-prefix)) + (only-in scribble/base doc-prefix) + "eval-helpers-and-pref-init.rkt" + "get-defs.rkt" + "insert-large-letters.rkt" + "insulated-read-language.rkt" + "local-member-names.rkt" + "named-undefined.rkt" + "parse-logger-args.rkt") (provide unit@) diff --git a/drracket/scribblings/drracket/common.rkt b/drracket/scribblings/drracket/common.rkt index b52696ac6..54c816e96 100644 --- a/drracket/scribblings/drracket/common.rkt +++ b/drracket/scribblings/drracket/common.rkt @@ -1,8 +1,8 @@ #lang racket/base -(require scribble/manual - (for-label racket - racket/gui/base)) +(require (for-label racket + racket/gui/base) + scribble/manual) (provide HtDP drlang diff --git a/drracket/scribblings/drracket/make-indentation-table.rkt b/drracket/scribblings/drracket/make-indentation-table.rkt index 80f60695a..b9b01069e 100644 --- a/drracket/scribblings/drracket/make-indentation-table.rkt +++ b/drracket/scribblings/drracket/make-indentation-table.rkt @@ -1,7 +1,7 @@ #lang racket/base -(require racket/gui/base - framework +(require framework racket/class + racket/gui/base racket/runtime-path) #| From b68a5ce0fc93f7330f6f271df47a7066bd0581a0 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 2/8] Fix 1 occurrence of `define-lambda-to-define` The `define` form supports a shorthand for defining functions. --- .../tests/drracket/gui-debugger/harness.rkt | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/drracket-test/tests/drracket/gui-debugger/harness.rkt b/drracket-test/tests/drracket/gui-debugger/harness.rkt index 2534fa448..26a57177b 100644 --- a/drracket-test/tests/drracket/gui-debugger/harness.rkt +++ b/drracket-test/tests/drracket/gui-debugger/harness.rkt @@ -22,24 +22,22 @@ (eval `(require ',(syntax->datum #'name)))] [_ (void)]))) -(define the-annotator - (lambda (stx) - (define source (syntax-source stx)) - (define-values (annotated break-posns) - (annotate-for-single-stepping - (expand-syntax stx) - ; always trigger breaks - (const (const #t)) - ; don't interpose on returned values - (const #f) - ; if we are not in tail position don't interpose on returned values - (lambda (_ __ . vals) (apply values vals)) - ; record-bound-identifier (do nothing at annotation time) - void - ; record-top-level-identifier (do nothing at runtime) - void - source)) - annotated)) +(define (the-annotator stx) + (define source (syntax-source stx)) + (define-values (annotated break-posns) + (annotate-for-single-stepping (expand-syntax stx) + ; always trigger breaks + (const (const #t)) + ; don't interpose on returned values + (const #f) + ; if we are not in tail position don't interpose on returned values + (lambda (_ __ . vals) (apply values vals)) + ; record-bound-identifier (do nothing at annotation time) + void + ; record-top-level-identifier (do nothing at runtime) + void + source)) + annotated) (define ((break/test id) [marks #f]) (define debug-marks From e6752608304816792b60fb8580e37c3aaab64a42 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 3/8] Fix 6 occurrences of `let-to-define` Internal definitions are recommended instead of `let` expressions, to reduce nesting. --- .../private/standalone-module-browser.rkt | 102 ++++++++--------- drracket/drracket/private/unit.rkt | 104 +++++++++--------- 2 files changed, 103 insertions(+), 103 deletions(-) diff --git a/drracket-tool-lib/drracket/private/standalone-module-browser.rkt b/drracket-tool-lib/drracket/private/standalone-module-browser.rkt index 31ca6ecd4..84651147a 100644 --- a/drracket-tool-lib/drracket/private/standalone-module-browser.rkt +++ b/drracket-tool-lib/drracket/private/standalone-module-browser.rkt @@ -412,13 +412,13 @@ ;; note: the preference drracket:module-browser:name-length is also used for ;; the View|Show Module Browser version of the module browser ;; here we just treat any pref value except '3' as if it were for the long names. - (let ([selection (send module-browser-name-length-choice get-selection)]) - (preferences:set 'drracket:module-browser:name-length (+ 2 selection)) - (send pasteboard - set-name-length - (case selection - [(0) 'long] - [(1) 'very-long]))))))) + (define selection (send module-browser-name-length-choice get-selection)) + (preferences:set 'drracket:module-browser:name-length (+ 2 selection)) + (send pasteboard + set-name-length + (case selection + [(0) 'long] + [(1) 'very-long])))))) (send pkg-choice set-string-selection (send pasteboard get-main-file-pkg)) (define ec (make-object overview-editor-canvas% vp pasteboard)) @@ -1059,24 +1059,25 @@ (let loop ([snips this-level-snips] [minor-dim (/ (- max-minor this-minor) 2)]) (unless (null? snips) - (let* ([snip (car snips)] - [new-major-coord (+ major-dim - (floor (- (/ this-major 2) - (/ (if vertical? - (get-snip-height snip) - (get-snip-width snip)) - 2))))]) - (if vertical? - (move-to snip minor-dim new-major-coord) - (move-to snip new-major-coord minor-dim)) - (loop (cdr snips) - (+ minor-dim - (if vertical? - (get-snip-hspace) - (get-snip-vspace)) - (if vertical? - (get-snip-width snip) - (get-snip-height snip))))))) + (define snip (car snips)) + (define new-major-coord + (+ major-dim + (floor (- (/ this-major 2) + (/ (if vertical? + (get-snip-height snip) + (get-snip-width snip)) + 2))))) + (if vertical? + (move-to snip minor-dim new-major-coord) + (move-to snip new-major-coord minor-dim)) + (loop (cdr snips) + (+ minor-dim + (if vertical? + (get-snip-hspace) + (get-snip-vspace)) + (if vertical? + (get-snip-width snip) + (get-snip-height snip)))))) (loop (cdr levels) (+ major-dim (if vertical? @@ -1119,8 +1120,8 @@ (let loop ([snip (find-first-snip)]) (when snip (when (is-a? snip boxed-word-snip<%>) - (let ([filename (send snip get-filename)]) - (on-boxed-word-double-click filename))) + (define filename (send snip get-filename)) + (on-boxed-word-double-click filename)) (loop (send snip next)))))]) (send canvas popup-menu right-button-menu (+ (send evt get-x) 1) (+ (send evt get-y) 1))] [else (super on-event evt)])) @@ -1256,19 +1257,20 @@ "" (string (string-ref word 0)))] [(medium) - (let ([m (regexp-match #rx"^(.*)\\.[^.]*$" word)]) - (let ([short-name (if m - (cadr m) - word)]) - (if (string=? short-name "") - "" - (let ([ms (regexp-match* #rx"-[^-]*" short-name)]) - (cond - [(null? ms) (substring short-name 0 (min 2 (string-length short-name)))] - [else - (apply string-append - (cons (substring short-name 0 1) - (map (λ (x) (substring x 1 2)) ms)))])))))] + (define m (regexp-match #rx"^(.*)\\.[^.]*$" word)) + (define short-name + (if m + (cadr m) + word)) + (if (string=? short-name "") + "" + (let ([ms (regexp-match* #rx"-[^-]*" short-name)]) + (cond + [(null? ms) (substring short-name 0 (min 2 (string-length short-name)))] + [else + (apply string-append + (cons (substring short-name 0 1) + (map (λ (x) (substring x 1 2)) ms)))])))] [(long) word] [(very-long) (string-append word ": " (format "~s" require-phases))])) last-name])) @@ -1345,16 +1347,16 @@ (λ () (moddep-current-open-input-file (λ (filename) - (let* ([p (open-input-file filename)] - [wxme? (regexp-match-peek #rx#"^WXME" p)]) - (if wxme? - (let ([t (new text%)]) - (close-input-port p) - (send t load-file filename) - (let ([prt (open-input-text-editor t)]) - (port-count-lines! prt) - prt)) - p)))) + (define p (open-input-file filename)) + (define wxme? (regexp-match-peek #rx#"^WXME" p)) + (if wxme? + (let ([t (new text%)]) + (close-input-port p) + (send t load-file filename) + (let ([prt (open-input-text-editor t)]) + (port-count-lines! prt) + prt)) + p))) (current-load-relative-directory #f) (define relative? (eq? init-dir 'relative)) (unless relative? ; already there diff --git a/drracket/drracket/private/unit.rkt b/drracket/drracket/private/unit.rkt index 5ba45cbec..86fed0c3f 100644 --- a/drracket/drracket/private/unit.rkt +++ b/drracket/drracket/private/unit.rkt @@ -139,59 +139,57 @@ (is-a? text drracket:rep:text%)) (is-a? event mouse-event%)) - (let ([add-sep - (let ([added? #f]) - (λ () - (unless added? - (set! added? #t) - (new separator-menu-item% [parent menu]))))]) - - (add-search-help-desk-menu-item text menu - (let-values ([(x y) - (send text dc-location-to-editor-location - (send event get-x) - (send event get-y))]) - (send text find-position x y)) - add-sep) - - (when (is-a? text editor:basic<%>) - (let-values ([(pos text) (send text get-pos/text event)]) - (when (and pos (is-a? text text%)) - (send text split-snip pos) - (send text split-snip (+ pos 1)) - (let ([snip (send text find-snip pos 'after-or-none)]) - (when (or (is-a? snip image-snip%) - (is-a? snip image-core:image%) - (is-a? snip cache-image-snip%) - (is-a? snip pict-snip:pict-snip%)) - (add-sep) - (define (save-image-callback _1 _2) - (define fn - (put-file #f - (send text get-top-level-window) - #f "untitled.png" "png")) - (when fn - (define kind (filename->kind fn)) - (cond - [kind - (cond - [(or (is-a? snip image-snip%) - (is-a? snip cache-image-snip%) - (is-a? snip pict-snip:pict-snip%)) - (send (send snip get-bitmap) save-file fn kind)] - [else - (image-core:save-image-as-bitmap snip fn kind)])] - [else - (message-box - (string-constant drscheme) - "Must choose a filename that ends with either .png, .jpg, .xbm, or .xpm" - #:dialog-mixin frame:focus-table-mixin)]))) - (new menu-item% - [parent menu] - [label (string-constant save-image)] - [callback save-image-callback])))))) - - (void)))))) + (define add-sep + (let ([added? #f]) + (λ () + (unless added? + (set! added? #t) + (new separator-menu-item% [parent menu]))))) + + (add-search-help-desk-menu-item text + menu + (let-values ([(x y) (send text + dc-location-to-editor-location + (send event get-x) + (send event get-y))]) + (send text find-position x y)) + add-sep) + + (when (is-a? text editor:basic<%>) + (let-values ([(pos text) (send text get-pos/text event)]) + (when (and pos (is-a? text text%)) + (send text split-snip pos) + (send text split-snip (+ pos 1)) + (let ([snip (send text find-snip pos 'after-or-none)]) + (when (or (is-a? snip image-snip%) + (is-a? snip image-core:image%) + (is-a? snip cache-image-snip%) + (is-a? snip pict-snip:pict-snip%)) + (add-sep) + (define (save-image-callback _1 _2) + (define fn + (put-file #f (send text get-top-level-window) #f "untitled.png" "png")) + (when fn + (define kind (filename->kind fn)) + (cond + [kind + (cond + [(or (is-a? snip image-snip%) + (is-a? snip cache-image-snip%) + (is-a? snip pict-snip:pict-snip%)) + (send (send snip get-bitmap) save-file fn kind)] + [else (image-core:save-image-as-bitmap snip fn kind)])] + [else + (message-box + (string-constant drscheme) + "Must choose a filename that ends with either .png, .jpg, .xbm, or .xpm" + #:dialog-mixin frame:focus-table-mixin)]))) + (new menu-item% + [parent menu] + [label (string-constant save-image)] + [callback save-image-callback])))))) + + (void))))) (define (add-search-help-desk-menu-item text menu position [add-sep void]) (let* ([end (send text get-end-position)] From 0cef31812a039754357f5c0237d959d2d2b354f1 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 4/8] Fix 1 occurrence of `if-let-to-cond` `cond` with internal definitions is preferred over `if` with `let`, to reduce nesting --- .../private/standalone-module-browser.rkt | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/drracket-tool-lib/drracket/private/standalone-module-browser.rkt b/drracket-tool-lib/drracket/private/standalone-module-browser.rkt index 84651147a..816a35835 100644 --- a/drracket-tool-lib/drracket/private/standalone-module-browser.rkt +++ b/drracket-tool-lib/drracket/private/standalone-module-browser.rkt @@ -461,17 +461,18 @@ (set! update-label (λ (s) - (if (and s (not (null? s))) - (let* ([currently-over (car s)] - [fn (send currently-over get-filename)] - [lines (send currently-over get-lines)]) - (when (and fn lines) - (define label (format filename-constant fn lines)) - (define pkg (send currently-over get-pkg)) - (when pkg - (set! label (string-append (format pkg-constant pkg) " " label))) - (send label-message set-label label))) - (send label-message set-label "")))) + (cond + [(and s (not (null? s))) + (define currently-over (car s)) + (define fn (send currently-over get-filename)) + (define lines (send currently-over get-lines)) + (when (and fn lines) + (define label (format filename-constant fn lines)) + (define pkg (send currently-over get-pkg)) + (when pkg + (set! label (string-append (format pkg-constant pkg) " " label))) + (send label-message set-label label))] + [else (send label-message set-label "")]))) (send pasteboard set-name-length From c862e565be28f07bd8c7d2167e417144483d1914 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 5/8] Fix 1 occurrence of `read-line-any` Specify a line mode of `'any` with `read-line` to avoid differences between Windows and other platforms. --- .../drracket/private/standalone-module-browser.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drracket-tool-lib/drracket/private/standalone-module-browser.rkt b/drracket-tool-lib/drracket/private/standalone-module-browser.rkt index 816a35835..ce7bdb865 100644 --- a/drracket-tool-lib/drracket/private/standalone-module-browser.rkt +++ b/drracket-tool-lib/drracket/private/standalone-module-browser.rkt @@ -938,7 +938,7 @@ (call-with-input-file filename (λ (port) (let loop ([n 0]) - (define l (read-line port)) + (define l (read-line port 'any)) (if (eof-object? l) n (loop (+ n 1))))) From 3732206126596df36798bc00f4ffb72964874139 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 6/8] Fix 1 occurrence of `quasiquote-to-list` This quasiquotation is equialent to a simple `list` call. --- .../drracket/find-module-path-completions.rkt | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt index 21ac1a1c9..5384f52e6 100644 --- a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt +++ b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt @@ -182,20 +182,20 @@ (and (regexp? (list-ref link-ent 2)) (regexp-match (list-ref link-ent 2) (version))) #t)) - `(,(list-ref link-ent 0) - ,(simplify-path - (let* ([encoded-path (list-ref link-ent 1)] - [path (cond - [(string? encoded-path) encoded-path] - [(bytes? encoded-path) (bytes->path encoded-path)] - [else (apply build-path - (for/list ([elem (in-list encoded-path)]) - (if (bytes? elem) - (bytes->path-element elem) - elem)))])]) - (if (relative-path? path) - (build-path base path) - path)))))] + (list (list-ref link-ent 0) + (simplify-path (let* ([encoded-path (list-ref link-ent 1)] + [path (cond + [(string? encoded-path) encoded-path] + [(bytes? encoded-path) (bytes->path encoded-path)] + [else + (apply build-path + (for/list ([elem (in-list encoded-path)]) + (if (bytes? elem) + (bytes->path-element elem) + elem)))])]) + (if (relative-path? path) + (build-path base path) + path)))))] [else '()])] [else (for/list ([clp (in-list library-collection-paths)]) From 3c76942f00efac37a371395b19c8d1ed4bc2e85e Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 7/8] Fix 1 occurrence of `cond-else-cond-to-cond` The `else` clause of this `cond` expression is another `cond` expression and can be flattened. --- .../drracket/find-module-path-completions.rkt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt index 5384f52e6..bcbb3a27d 100644 --- a/drracket-tool-text-lib/drracket/find-module-path-completions.rkt +++ b/drracket-tool-text-lib/drracket/find-module-path-completions.rkt @@ -207,15 +207,12 @@ (for/list ([just-one (in-list link-content)]) (define-values (what pth) (apply values just-one)) (cond - [(string? what) - (list just-one)] - [else - (cond - [(safe-directory-exists? pth) - (for/list ([dir (in-list (safe-directory-list pth))] - #:when (safe-directory-exists? (build-path pth dir))) - (list (path->string dir) (build-path pth dir)))] - [else '()])]))))) + [(string? what) (list just-one)] + [(safe-directory-exists? pth) + (for/list ([dir (in-list (safe-directory-list pth))] + #:when (safe-directory-exists? (build-path pth dir))) + (list (path->string dir) (build-path pth dir)))] + [else '()]))))) (define-syntax-rule (thunk-and-quote e) (values (λ () e) 'e)) From 69c867a73b7feaba873fd258fa173b2046a872a9 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:21:40 +0000 Subject: [PATCH 8/8] Fix 1 occurrence of `zero-comparison-to-positive?` This expression is equivalent to calling the `positive?` predicate. --- drracket/help/bug-report.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drracket/help/bug-report.rkt b/drracket/help/bug-report.rkt index e0aef91ea..4c6964194 100644 --- a/drracket/help/bug-report.rkt +++ b/drracket/help/bug-report.rkt @@ -29,7 +29,7 @@ [s (if (<= (string-length s) 200) s (substring s 0 200))]) - (and ((string-length s) . > . 0) s))) + (and (positive? (string-length s)) s))) (preferences:set-default 'drracket:email "" string? #:aliases '(drscheme:email)) (preferences:set-default 'drracket:full-name "" string? #:aliases '(drscheme:full-name))