lispci / fiveam

Common Lisp regression testing framework
BSD 3-Clause "New" or "Revised" License
186 stars 33 forks source link

Style warning with SBCL 1.4.10 #56

Closed galdor closed 4 years ago

galdor commented 6 years ago

When compiling fiveam with SBCL 1.4.10, I get the following style warning:

; file: /home/galdor/dev/site-lisp/fiveam/src/run.lisp
; in: DEFUN RUN!
;     (DEFUN IT.BESE.FIVEAM:RUN!
;            (
;             &OPTIONAL (IT.BESE.FIVEAM::TEST-SPEC IT.BESE.FIVEAM::*SUITE*)
;             &KEY
;             ((:PRINT-NAMES IT.BESE.FIVEAM:*PRINT-NAMES*)
;              IT.BESE.FIVEAM:*PRINT-NAMES*))
;       "Equivalent to (explain! (run TEST-SPEC))."
;       (IT.BESE.FIVEAM:EXPLAIN! (IT.BESE.FIVEAM:RUN IT.BESE.FIVEAM::TEST-SPEC)))
; --> PROGN SB-IMPL::%DEFUN SB-IMPL::%DEFUN SB-INT:NAMED-LAMBDA
; ==>
;   #'(SB-INT:NAMED-LAMBDA IT.BESE.FIVEAM:RUN!
;         (&OPTIONAL (IT.BESE.FIVEAM::TEST-SPEC IT.BESE.FIVEAM::*SUITE*) &KEY
;          ((:PRINT-NAMES IT.BESE.FIVEAM:*PRINT-NAMES*)
;           IT.BESE.FIVEAM:*PRINT-NAMES*))
;       (DECLARE (SB-C::TOP-LEVEL-FORM))
;       "Equivalent to (explain! (run TEST-SPEC))."
;       (BLOCK IT.BESE.FIVEAM:RUN!
;         (IT.BESE.FIVEAM:EXPLAIN!
;          (IT.BESE.FIVEAM:RUN IT.BESE.FIVEAM::TEST-SPEC))))
; 
; caught STYLE-WARNING:
;   &OPTIONAL and &KEY found in the same lambda list: (&OPTIONAL
;                                                      (TEST-SPEC *SUITE*) &KEY
;                                                      ((:PRINT-NAMES
;                                                        *PRINT-NAMES*)
;                                                       *PRINT-NAMES*))

Fixing it could be as simple as using a key argument for TEST-SPEC, would you agree to such a change ?

galdor commented 6 years ago

It might be easier to find a way not to use the key parameters.

sionescu commented 6 years ago

You can ignore style warnings, after all they're about style.

It might be easier to find a way not to use the key parameters.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub[1], or mute the thread[2].

-- Stelian Ionescu a.k.a. fe[nl]ix Quidquid latine dictum sit, altum videtur.

Links:

  1. https://github.com/sionescu/fiveam/issues/56#issuecomment-417345221
  2. https://github.com/notifications/unsubscribe-auth/AALvOQG2BoGAa8yX1mD_USWn2llZ68cqks5uV_pKgaJpZM4WTl_H
galdor commented 6 years ago

Yes of course, but they generally here to signal constructions that can be confusing. If it can be fixed easily, why not :)

foretspaisibles commented 5 years ago

@galdor Maybe you can prepare a patch based on this? http://www.sbcl.org/manual/index.html#Controlling-Verbosity

but they generally here to signal constructions that can be confusing

You are right, however, these warnings are rather for developers than for users of the software package… and users are most likely to load the package with quickload, which hide the warning.