Skip to content

Unwanted suggestion from error-to-raise-arguments-error #637

@jackfirth

Description

@jackfirth

Problem summary

The error-to-raise-arguments-error rule shouldn't apply when the error message uses ~a under quotes, like it did in racket/drracket#779. It should only apply if all uses of ~a in the message are surrounded by spaces.

Test case for code that shouldn't be refactored

#lang resyntax/test

no-change-test: "this code should not be refactored"
--------------------
#lang racket
(define (find-output-radio-box label)
  (error 'find-output-radio-box "could not find `~a' radio box"
         label))
--------------------

Unwanted suggestion

#lang racket
(define (f label)
  (raise-arguments-error 'find-output-radio-box "could not find `' radio box" "label" label))

Metadata

Metadata

Assignees

Labels

autopilot-candidateThe Copilot Agent should attempt this during a scheduled Autopilot runbugSomething isn't workingexisting lintIssues or pull requests relating to existing lints

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions