From b77b4e49ebd7ec8499166491940fa5bff7fcbab8 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 00:15:21 +0000 Subject: [PATCH 1/6] Fix 7 occurrences of `let-to-define` Internal definitions are recommended instead of `let` expressions, to reduce nesting. --- .../tests/drracket/syncheck-test.rkt | 347 +++++++++--------- .../tests/drracket/teaching-lang-coverage.rkt | 79 ++-- .../teaching-lang-sharing-modules.rkt | 21 +- 3 files changed, 214 insertions(+), 233 deletions(-) diff --git a/drracket-test/tests/drracket/syncheck-test.rkt b/drracket-test/tests/drracket/syncheck-test.rkt index 3a13bde9a..4dbb56905 100644 --- a/drracket-test/tests/drracket/syncheck-test.rkt +++ b/drracket-test/tests/drracket/syncheck-test.rkt @@ -1809,177 +1809,163 @@ (define ((run-one-test save-dir) test) (set! total-tests-run (+ total-tests-run 1)) - (let* ([drs (wait-for-drracket-frame)] - [defs (queue-callback/res (λ () (send drs get-definitions-text)))]) - (clear-definitions drs) - (cond - [(test? test) - (let ([pre-input (test-input test)] - [expected (test-expected test)] - [arrows (test-arrows test)] - [tooltips (test-tooltips test)] - [relative "list.rkt"] - [setup (test-setup test)] - [teardown (test-teardown test)] - [extra-files (test-extra-files test)] - [extra-info? (test-extra-info? test)]) - (define extra-file-paths - (for/list ([(name contents) (in-hash extra-files)]) - (define path (build-path save-dir name)) - (display-to-file contents path #:mode 'text) - path)) - - (define setup-result (setup)) - (define input (if (procedure? pre-input) - (pre-input setup-result) - pre-input)) - (cond - [(dir-test? test) - (insert-in-definitions drs (format input (path->require-string relative)))] - [else (insert-in-definitions drs input)]) - (click-check-syntax-and-check-errors drs test extra-info?) - - ;; need to check for syntax error here - (let ([got (get-annotated-output drs)] - [got-arrows (queue-callback/res (λ () (send defs syncheck:get-bindings-table)))]) - (when extra-info? - (printf "got-arrows\n") - (pretty-print got-arrows) - (newline) - - (printf "'drracket:syncheck:show-arrows? ~s\n" - (preferences:get 'drracket:syncheck:show-arrows?))) - (compare-output (cond - [(dir-test? test) - (map (lambda (x) - (list (if (eq? (car x) 'relative-path) - (path->require-string relative) - (car x)) - (cadr x))) - expected)] - [else - expected]) - got - arrows - got-arrows - input + (define drs (wait-for-drracket-frame)) + (define defs (queue-callback/res (λ () (send drs get-definitions-text)))) + (clear-definitions drs) + (cond + [(test? test) + (let ([pre-input (test-input test)] + [expected (test-expected test)] + [arrows (test-arrows test)] + [tooltips (test-tooltips test)] + [relative "list.rkt"] + [setup (test-setup test)] + [teardown (test-teardown test)] + [extra-files (test-extra-files test)] + [extra-info? (test-extra-info? test)]) + (define extra-file-paths + (for/list ([(name contents) (in-hash extra-files)]) + (define path (build-path save-dir name)) + (display-to-file contents path #:mode 'text) + path)) + + (define setup-result (setup)) + (define input + (if (procedure? pre-input) + (pre-input setup-result) + pre-input)) + (cond + [(dir-test? test) + (insert-in-definitions drs (format input (path->require-string relative)))] + [else (insert-in-definitions drs input)]) + (click-check-syntax-and-check-errors drs test extra-info?) + + ;; need to check for syntax error here + (let ([got (get-annotated-output drs)] + [got-arrows (queue-callback/res (λ () (send defs syncheck:get-bindings-table)))]) + (when extra-info? + (printf "got-arrows\n") + (pretty-print got-arrows) + (newline) + + (printf "'drracket:syncheck:show-arrows? ~s\n" + (preferences:get 'drracket:syncheck:show-arrows?))) + (compare-output (cond + [(dir-test? test) + (map (lambda (x) + (list (if (eq? (car x) 'relative-path) + (path->require-string relative) + (car x)) + (cadr x))) + expected)] + [else expected]) + got + arrows + got-arrows + input + (test-line test))) + (when tooltips + (compare-tooltips (queue-callback/res (λ () (send defs syncheck:get-bindings-table #t))) + tooltips (test-line test))) - (when tooltips - (compare-tooltips (queue-callback/res (λ () (send defs syncheck:get-bindings-table #t))) - tooltips - (test-line test))) - - (teardown setup-result) - (for-each delete-directory/files extra-file-paths))] - [(rename-test? test) - (insert-in-definitions drs (rename-test-input test)) - (click-check-syntax-and-check-errors drs test #f) - (define menu-item - (queue-callback/res - (λ () - (define defs (send drs get-definitions-text)) - (define menu (make-object popup-menu%)) - (send defs syncheck:build-popup-menu menu (rename-test-pos test) defs) - (define item-name (format "Rename ~a" (rename-test-old-name test))) - (define menu-item - (for/or ([x (in-list (send menu get-items))]) - (and (is-a? x labelled-menu-item<%>) - (equal? (send x get-label) item-name) - x))) - (cond - [menu-item - menu-item] - [else - (eprintf "syncheck-test.rkt: rename test ~s didn't find menu item named ~s in ~s\n" - test - item-name - (map (λ (x) (and (is-a? x labelled-menu-item<%>) (send x get-label))) - (send menu get-items))) - #f])))) - (when (and menu-item (rename-test-new-name test) (rename-test-output test)) - (queue-callback (λ () (send menu-item command (make-object control-event% 'menu)))) - (wait-for-new-frame drs) - (for ([x (in-string (rename-test-new-name test))]) - (test:keystroke x)) - (test:button-push "OK") - (define result - (queue-callback/res (λ () - (define defs (send drs get-definitions-text)) - (send defs get-text 0 (send defs last-position))))) - (unless (equal? result (rename-test-output test)) - (eprintf "syncheck-test.rkt FAILED\n test ~s\n got ~s\n" - test - result)))] - [(prefix-test? test) - (insert-in-definitions drs (prefix-test-input test)) - (click-check-syntax-and-check-errors drs test #f) - (define menu-item - (queue-callback/res - (λ () - (define defs (send drs get-definitions-text)) - (define menu (make-object popup-menu%)) - (send defs syncheck:build-popup-menu menu (prefix-test-pos test) defs) - (define item-name "Add Require Prefix") - (define menu-item - (for/or ([x (in-list (send menu get-items))]) - (and (is-a? x labelled-menu-item<%>) - (equal? (send x get-label) item-name) - x))) - (cond - [menu-item - menu-item] - [else - (eprintf "syncheck-test.rkt: prefix test ~s didn't find menu item named ~s in ~s\n" - test - item-name - (map (λ (x) (and (is-a? x labelled-menu-item<%>) (send x get-label))) - (send menu get-items))) - #f])))) - (when menu-item - (queue-callback (λ () (send menu-item command (make-object control-event% 'menu)))) - (wait-for-new-frame drs) - (for ([x (in-string (prefix-test-prefix test))]) - (test:keystroke x)) - (test:button-push "OK") - (define result - (queue-callback/res (λ () - (define defs (send drs get-definitions-text)) - (send defs get-text 0 (send defs last-position))))) - (unless (equal? result (prefix-test-output test)) - (eprintf "syncheck-test.rkt FAILED\n test ~s\n got ~s\n" - test - result)))] - [(err-test? test) - (let/ec done - (insert-in-definitions drs (err-test-input test)) - (define err (click-check-syntax-and-check-errors drs test #f #:err-ok? #t)) - (unless err - (eprintf "syncheck-test.rkt FAILED\n test ~s\n didn't get an error\n" - test) - (done)) - (define expected (err-test-expected test)) - (define message-good? - (cond - [(string? expected) - (equal? expected err)] - [else - (regexp-match? expected err)])) - (unless message-good? - (eprintf "syncheck-test.rkt FAILED error doesn't match\n test ~s\n ~s\n" - test - err) - (done)) - (define srclocs (queue-callback/res (λ () (send (send drs get-interactions-text) get-error-ranges)))) - (define actual - (for/set ([srcloc (in-list srclocs)]) - (list (srcloc-position srcloc) - (srcloc-span srcloc)))) - (unless (equal? actual (err-test-locations test)) - (eprintf "syncheck-test.rkt FAILED srclocs don't match\n test ~s\n actual ~s\n got ~s\n" - test - actual - (err-test-locations test))) - (void))]))) + + (teardown setup-result) + (for-each delete-directory/files extra-file-paths))] + [(rename-test? test) + (insert-in-definitions drs (rename-test-input test)) + (click-check-syntax-and-check-errors drs test #f) + (define menu-item + (queue-callback/res + (λ () + (define defs (send drs get-definitions-text)) + (define menu (make-object popup-menu%)) + (send defs syncheck:build-popup-menu menu (rename-test-pos test) defs) + (define item-name (format "Rename ~a" (rename-test-old-name test))) + (define menu-item + (for/or ([x (in-list (send menu get-items))]) + (and (is-a? x labelled-menu-item<%>) (equal? (send x get-label) item-name) x))) + (cond + [menu-item menu-item] + [else + (eprintf "syncheck-test.rkt: rename test ~s didn't find menu item named ~s in ~s\n" + test + item-name + (map (λ (x) (and (is-a? x labelled-menu-item<%>) (send x get-label))) + (send menu get-items))) + #f])))) + (when (and menu-item (rename-test-new-name test) (rename-test-output test)) + (queue-callback (λ () (send menu-item command (make-object control-event% 'menu)))) + (wait-for-new-frame drs) + (for ([x (in-string (rename-test-new-name test))]) + (test:keystroke x)) + (test:button-push "OK") + (define result + (queue-callback/res (λ () + (define defs (send drs get-definitions-text)) + (send defs get-text 0 (send defs last-position))))) + (unless (equal? result (rename-test-output test)) + (eprintf "syncheck-test.rkt FAILED\n test ~s\n got ~s\n" test result)))] + [(prefix-test? test) + (insert-in-definitions drs (prefix-test-input test)) + (click-check-syntax-and-check-errors drs test #f) + (define menu-item + (queue-callback/res + (λ () + (define defs (send drs get-definitions-text)) + (define menu (make-object popup-menu%)) + (send defs syncheck:build-popup-menu menu (prefix-test-pos test) defs) + (define item-name "Add Require Prefix") + (define menu-item + (for/or ([x (in-list (send menu get-items))]) + (and (is-a? x labelled-menu-item<%>) (equal? (send x get-label) item-name) x))) + (cond + [menu-item menu-item] + [else + (eprintf "syncheck-test.rkt: prefix test ~s didn't find menu item named ~s in ~s\n" + test + item-name + (map (λ (x) (and (is-a? x labelled-menu-item<%>) (send x get-label))) + (send menu get-items))) + #f])))) + (when menu-item + (queue-callback (λ () (send menu-item command (make-object control-event% 'menu)))) + (wait-for-new-frame drs) + (for ([x (in-string (prefix-test-prefix test))]) + (test:keystroke x)) + (test:button-push "OK") + (define result + (queue-callback/res (λ () + (define defs (send drs get-definitions-text)) + (send defs get-text 0 (send defs last-position))))) + (unless (equal? result (prefix-test-output test)) + (eprintf "syncheck-test.rkt FAILED\n test ~s\n got ~s\n" test result)))] + [(err-test? test) + (let/ec done + (insert-in-definitions drs (err-test-input test)) + (define err (click-check-syntax-and-check-errors drs test #f #:err-ok? #t)) + (unless err + (eprintf "syncheck-test.rkt FAILED\n test ~s\n didn't get an error\n" test) + (done)) + (define expected (err-test-expected test)) + (define message-good? + (cond + [(string? expected) (equal? expected err)] + [else (regexp-match? expected err)])) + (unless message-good? + (eprintf "syncheck-test.rkt FAILED error doesn't match\n test ~s\n ~s\n" test err) + (done)) + (define srclocs + (queue-callback/res (λ () (send (send drs get-interactions-text) get-error-ranges)))) + (define actual + (for/set ([srcloc (in-list srclocs)]) + (list (srcloc-position srcloc) (srcloc-span srcloc)))) + (unless (equal? actual (err-test-locations test)) + (eprintf + "syncheck-test.rkt FAILED srclocs don't match\n test ~s\n actual ~s\n got ~s\n" + test + actual + (err-test-locations test))) + (void))])) (define (path->require-string relative) (define (p->string p) @@ -2069,15 +2055,18 @@ (for-each (test-binding #f actual-ht) (hash-map expected-ht cons)))) (define (compare-output raw-expected got arrows arrows-got input line) - (let ([expected (collapse-and-rename raw-expected)]) - (cond - [(not-matching-colors got expected) - => - (λ (msg) - (eprintf "FAILED line ~a: ~s\n expected: ~s\n got: ~s\n ~a\n" - line input expected got msg))] - [else - (compare-arrows input arrows arrows-got line)]))) + (define expected (collapse-and-rename raw-expected)) + (cond + [(not-matching-colors got expected) + => + (λ (msg) + (eprintf "FAILED line ~a: ~s\n expected: ~s\n got: ~s\n ~a\n" + line + input + expected + got + msg))] + [else (compare-arrows input arrows arrows-got line)])) (define (not-matching-colors got expected) (let loop ([got got] diff --git a/drracket-test/tests/drracket/teaching-lang-coverage.rkt b/drracket-test/tests/drracket/teaching-lang-coverage.rkt index 6977d70af..4232f9c06 100644 --- a/drracket-test/tests/drracket/teaching-lang-coverage.rkt +++ b/drracket-test/tests/drracket/teaching-lang-coverage.rkt @@ -67,17 +67,15 @@ ;; get-annotate-output : drscheme-frame -> (listof str/ann) (define (get-annotated-output drs) - (let ([chan (make-channel)]) - (queue-callback - (λ () - (channel-put chan (get-string/style-desc (send drs get-definitions-text))))) - (channel-get chan))) + (define chan (make-channel)) + (queue-callback (λ () (channel-put chan (get-string/style-desc (send drs get-definitions-text))))) + (channel-get chan)) ;; returns #t if an element of the result of get-string/style-desc ;; corresponds to an uncovered region of the editor (define (is-uncovered? ele) - (let ([style (list-ref ele 1)]) - (eq? style 'test-coverage-off))) + (define style (list-ref ele 1)) + (eq? style 'test-coverage-off)) ;; find-uncovered-text : list[get-string/style-desc result] -> (listof string) ;; returns strings containing the uncovered text in the editor (in the order they appear in the file) @@ -86,38 +84,35 @@ (fire-up-drracket-and-run-tests (λ () - (let* ([drr-frame (wait-for-drracket-frame)] - [definitions-text (send drr-frame get-definitions-text)] - [interactions-text (send drr-frame get-interactions-text)]) - - (let ([last-lang #f]) - (for ([t (in-list tests)]) - - - (let* ([this-lang (test-lang-regexp t)] - [same-last-time? (and (regexp? last-lang) - (equal? (object-name last-lang) - (object-name this-lang)))]) - (unless same-last-time? - (set! last-lang this-lang) - (set-language-level! (list this-lang)))) - - (clear-definitions drr-frame) - (insert-in-definitions drr-frame (test-program t)) - (do-execute drr-frame) - - (let ([result (fetch-output - drr-frame - (send interactions-text paragraph-start-position 2) - (send interactions-text last-position))]) - (unless (regexp-match #rx"^[ \n\t0-9>]*$" result) - (eprintf "FAILED line ~a, got ~s for the output, but expected only digits and whitespace" - (test-line t) - result))) - - (let ([got (find-uncovered-text (get-annotated-output drr-frame))]) - (unless (equal? got (test-uncovered t)) - (eprintf "FAILED line ~a\n got: ~s\nexpected: ~s\n" - (test-line t) - got - (test-uncovered t))))))))) + (define drr-frame (wait-for-drracket-frame)) + (send drr-frame get-definitions-text) + (define interactions-text (send drr-frame get-interactions-text)) + + (define last-lang #f) + (for ([t (in-list tests)]) + + (let* ([this-lang (test-lang-regexp t)] + [same-last-time? (and (regexp? last-lang) + (equal? (object-name last-lang) (object-name this-lang)))]) + (unless same-last-time? + (set! last-lang this-lang) + (set-language-level! (list this-lang)))) + + (clear-definitions drr-frame) + (insert-in-definitions drr-frame (test-program t)) + (do-execute drr-frame) + + (let ([result (fetch-output drr-frame + (send interactions-text paragraph-start-position 2) + (send interactions-text last-position))]) + (unless (regexp-match #rx"^[ \n\t0-9>]*$" result) + (eprintf "FAILED line ~a, got ~s for the output, but expected only digits and whitespace" + (test-line t) + result))) + + (let ([got (find-uncovered-text (get-annotated-output drr-frame))]) + (unless (equal? got (test-uncovered t)) + (eprintf "FAILED line ~a\n got: ~s\nexpected: ~s\n" + (test-line t) + got + (test-uncovered t))))))) diff --git a/drracket-test/tests/drracket/teaching-lang-sharing-modules.rkt b/drracket-test/tests/drracket/teaching-lang-sharing-modules.rkt index 620314ba9..7aa5cf4c5 100644 --- a/drracket-test/tests/drracket/teaching-lang-sharing-modules.rkt +++ b/drracket-test/tests/drracket/teaching-lang-sharing-modules.rkt @@ -42,22 +42,19 @@ Of course, other (similar) things can go wrong, too. (for ([exp (in-list things-to-try)]) (insert-in-definitions drs-frame (format "~s\n" exp))) (do-execute drs-frame) - (let ([output (fetch-output drs-frame)]) - (cond - [(equal? output first-line-output) - (try-interaction-test drs-frame)] - [else - (eprintf "teaching-lang-sharing-modules.rkt: got bad output from execute: ~s" - output)]))) + (define output (fetch-output drs-frame)) + (cond + [(equal? output first-line-output) (try-interaction-test drs-frame)] + [else (eprintf "teaching-lang-sharing-modules.rkt: got bad output from execute: ~s" output)])) #:prefs '([plt:framework-pref:framework:autosaving-on? #f]))) (define (try-interaction-test drs-frame) (type-in-interactions drs-frame "1\n") (wait-for-computation drs-frame) - (let ([interactions-output (fetch-output drs-frame)]) - (unless (equal? interactions-output (format "~a\n> 1\n1" first-line-output)) - (error 'teaching-language-sharing-modules.rkt - "got bad output from interaction: ~s\n" - interactions-output)))) + (define interactions-output (fetch-output drs-frame)) + (unless (equal? interactions-output (format "~a\n> 1\n1" first-line-output)) + (error 'teaching-language-sharing-modules.rkt + "got bad output from interaction: ~s\n" + interactions-output))) (go) From 05212051df0e84e31b4de26190946411509a0dad Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 00:15:21 +0000 Subject: [PATCH 2/6] Fix 2 occurrences of `cond-let-to-cond-define` Internal definitions are recommended instead of `let` expressions, to reduce nesting. --- .../tests/drracket/syncheck-test.rkt | 10 +++---- drracket-test/tests/drracket/teachpack.rkt | 26 +++++++------------ 2 files changed, 15 insertions(+), 21 deletions(-) diff --git a/drracket-test/tests/drracket/syncheck-test.rkt b/drracket-test/tests/drracket/syncheck-test.rkt index 4dbb56905..5cf9cf708 100644 --- a/drracket-test/tests/drracket/syncheck-test.rkt +++ b/drracket-test/tests/drracket/syncheck-test.rkt @@ -1997,11 +1997,11 @@ [(null? ids) null] [(null? (cdr ids)) ids] [else - (let ([fst (car ids)] - [snd (cadr ids)]) - (if (eq? (cadr fst) (cadr snd)) - (loop (cons (list (string-append (car fst) (car snd)) (cadr fst)) (cddr ids))) - (cons fst (loop (cdr ids)))))]))) + (define fst (car ids)) + (define snd (cadr ids)) + (if (eq? (cadr fst) (cadr snd)) + (loop (cons (list (string-append (car fst) (car snd)) (cadr fst)) (cddr ids))) + (cons fst (loop (cdr ids))))]))) ;; compare-arrows : expression ;; (or/c #f (listof (cons (list number-or-proc number-or-proc) diff --git a/drracket-test/tests/drracket/teachpack.rkt b/drracket-test/tests/drracket/teachpack.rkt index a85d19427..f9b9fc0d5 100644 --- a/drracket-test/tests/drracket/teachpack.rkt +++ b/drracket-test/tests/drracket/teachpack.rkt @@ -25,22 +25,16 @@ (cond [(null? tp-exps) null] [else - (let ([tp-name - (normal-case-path - (normalize-path - (collection-file-path - (string-append - (format good-teachpack-name n) - ".ss") - "tests" "drracket")))]) - (call-with-output-file tp-name - (lambda (port) (write (car tp-exps) port)) - 'truncate) - (use-get/put-dialog - (lambda () - (fw:test:menu-select "Language" "Add Teachpack…")) - tp-name) - (cons tp-name (loop (cdr tp-exps) (+ n 1))))]))]) + (define tp-name + (normal-case-path (normalize-path (collection-file-path + (string-append (format good-teachpack-name n) + ".ss") + "tests" + "drracket")))) + (call-with-output-file tp-name (lambda (port) (write (car tp-exps) port)) 'truncate) + (use-get/put-dialog (lambda () (fw:test:menu-select "Language" "Add Teachpack…")) + tp-name) + (cons tp-name (loop (cdr tp-exps) (+ n 1)))]))]) (do-execute drs-frame) From 01bac7c0656c9545e34ac4500931687513c6876d Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 00:15:21 +0000 Subject: [PATCH 3/6] Fix 7 occurrences of `printf-to-display` This use of `printf` has no arguments other than the template string. --- drracket-test/tests/drracket/memory-log.rkt | 10 +++++----- drracket-test/tests/drracket/syncheck-test.rkt | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drracket-test/tests/drracket/memory-log.rkt b/drracket-test/tests/drracket/memory-log.rkt index 0e6ebbc02..dad8f043b 100644 --- a/drracket-test/tests/drracket/memory-log.rkt +++ b/drracket-test/tests/drracket/memory-log.rkt @@ -6,11 +6,11 @@ framework/preferences drracket/private/syncheck/local-member-names) ;; for the syncheck:arrows-visible? method -(printf "The printouts below are designed to trick drdr into graphing them;\n") -(printf "they aren't times, but memory usage. The first is starting up DrRacket,\n") -(printf "the second is after the documentation index has been loaded (via check\n") -(printf "syntax) and the third is after online check syntax has completed once (so\n") -(printf "a place was created and the docs loaded there.\n") +(displayln "The printouts below are designed to trick drdr into graphing them;") +(displayln "they aren't times, but memory usage. The first is starting up DrRacket,") +(displayln "the second is after the documentation index has been loaded (via check") +(displayln "syntax) and the third is after online check syntax has completed once (so") +(displayln "a place was created and the docs loaded there.") ;; mem-cnt returns the amount of memory used, iterating (collect-garbage) ;; until the delta is less than 1% or we've done it 20 times. diff --git a/drracket-test/tests/drracket/syncheck-test.rkt b/drracket-test/tests/drracket/syncheck-test.rkt index 5cf9cf708..13e34638d 100644 --- a/drracket-test/tests/drracket/syncheck-test.rkt +++ b/drracket-test/tests/drracket/syncheck-test.rkt @@ -1337,7 +1337,7 @@ (hash "m.rkt" (with-output-to-string (λ () - (printf "#lang racket/base\n") + (displayln "#lang racket/base") (pretty-write '(require (for-syntax racket/base))) (pretty-write '(provide m)) (pretty-write @@ -1393,7 +1393,7 @@ "n.rkt" (with-output-to-string (λ () - (printf "#lang racket/base\n") + (displayln "#lang racket/base") (pretty-write '(require (for-syntax racket/base))) (pretty-write '(provide n)) (pretty-write From 51c83f462318968b318d4ab5ef9d15e4494b0510 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 00:15:21 +0000 Subject: [PATCH 4/6] Fix 1 occurrence of `inline-unnecessary-begin` This `begin` form can be flattened into the surrounding definition context. --- drracket-test/tests/drracket/syncheck-test.rkt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drracket-test/tests/drracket/syncheck-test.rkt b/drracket-test/tests/drracket/syncheck-test.rkt index 13e34638d..c79f6f1e9 100644 --- a/drracket-test/tests/drracket/syncheck-test.rkt +++ b/drracket-test/tests/drracket/syncheck-test.rkt @@ -1772,12 +1772,11 @@ (λ () (define drs (wait-for-drracket-frame)) ;(set-language-level! (list "Pretty Big")) - (begin - (set-language-level! (list "Pretty Big") #f) - (test:set-radio-box-item! #rx"No debugging or profiling") - (let ([f (test:get-active-top-level-window)]) - (test:button-push "OK") - (wait-for-new-frame f))) + (set-language-level! (list "Pretty Big") #f) + (test:set-radio-box-item! #rx"No debugging or profiling") + (let ([f (test:get-active-top-level-window)]) + (test:button-push "OK") + (wait-for-new-frame f)) (do-execute drs) (define defs (queue-callback/res (λ () (send drs get-definitions-text)))) (define filename (make-temporary-file "syncheck-test~a" #f temp-dir)) From 6af8d9ecbf8e8dbd2071b5003df64025145d9135 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 00:15:21 +0000 Subject: [PATCH 5/6] Fix 1 occurrence of `map-to-for` This `map` operation can be replaced with a `for/list` loop. --- drracket-test/tests/drracket/syncheck-test.rkt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drracket-test/tests/drracket/syncheck-test.rkt b/drracket-test/tests/drracket/syncheck-test.rkt index c79f6f1e9..de5b3dfb4 100644 --- a/drracket-test/tests/drracket/syncheck-test.rkt +++ b/drracket-test/tests/drracket/syncheck-test.rkt @@ -1983,14 +1983,13 @@ (define (collapse-and-rename expected) (define renamed - (map (lambda (ent) - (let* ([str (car ent)] - [id (cadr ent)] - [matches (assoc id remappings)]) - (if matches - (list str (cadr matches)) - ent))) - expected)) + (for/list ([ent (in-list expected)]) + (define str (car ent)) + (define id (cadr ent)) + (define matches (assoc id remappings)) + (if matches + (list str (cadr matches)) + ent))) (let loop ([ids renamed]) (cond [(null? ids) null] From 97c9b5d304ae85a6fbe4202dbae0c4ed51faa5e0 Mon Sep 17 00:00:00 2001 From: "resyntax-ci[bot]" <181813515+resyntax-ci[bot]@users.noreply.github.com> Date: Sun, 16 Aug 2026 00:15:21 +0000 Subject: [PATCH 6/6] Fix 2 occurrences of `string-append-with-format-to-format` This `string-append` with `format` expression can be simplified to a single `format` call. --- drracket-test/tests/drracket/language-test.rkt | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drracket-test/tests/drracket/language-test.rkt b/drracket-test/tests/drracket/language-test.rkt index c976ce7ed..d7fa75b55 100644 --- a/drracket-test/tests/drracket/language-test.rkt +++ b/drracket-test/tests/drracket/language-test.rkt @@ -1837,16 +1837,22 @@ the settings above should match r5rs (define (test-undefined-var id #:icon+in? [icon+in? #f]) (test-expression id - (string-append (if icon+in? "{stop-22x22.png} " "") - (format "~a: this variable is not defined" id) - (if icon+in? (format " in: ~a " id) "")))) + (format "~a~a: this variable is not defined~a" + (if icon+in? "{stop-22x22.png} " "") + id + (if icon+in? + (format " in: ~a " id) + "")))) (define (test-undefined-fn exp id #:icon+in? [icon+in? #f]) (test-expression exp - (string-append (if icon+in? "{stop-22x22.png} " "") - (format "~a: this function is not defined" id) - (if icon+in? (format " in: ~a " id) "")))) + (format "~a~a: this function is not defined~a" + (if icon+in? "{stop-22x22.png} " "") + id + (if icon+in? + (format " in: ~a " id) + "")))) (define-syntax (go stx) (syntax-case stx ()