lisp-critic
lisp-critic copied to clipboard
Check-prefix rule should not consider issue usage of standard functions like CHECK-TYPE
A new rule check-prefix was added 6 months ago. However now it produces too many warnings on all my projects where check-type
function is used to ensure contact on input values:
(DEFUN %RENDER-ERROR-PLACEHOLDER
(NAME WIDGET-CLASS ERROR-PLACEHOLDERS)
(CHECK-TYPE NAME STRING)
(LET ((WIDGET (MAKE-INSTANCE WIDGET-CLASS :NAME NAME)))
(SETF (GETHASH NAME ERROR-PLACEHOLDERS) WIDGET)
(REBLOCKS/WIDGET:RENDER WIDGET)
(VALUES)))
----------------------------------------------------------------------
[check-prefix]: check is not a helpful prefix. It doesn't say what
happens after checking. If this is a predicate, use a property-p name
to say what it tests for.
I think the rule should not warn about standard functions usage. Probably it should match only (defun check-some-thing ...)
forms only?