athos / Pinpointer

Pinpointer is yet another clojure.spec error reporter based on a precise error analysis
Eclipse Public License 1.0
94 stars 3 forks source link

Can't highlight the problematic part when toplevel s/alt fails with insufficient input #1

Closed athos closed 6 years ago

athos commented 6 years ago
=> (p/pinpoint (s/alt :i integer? :s string?) [])                           
Detected 1 spec error:                                                          
----------------------------------------------------------------------          
(1/1)                                                                           

    Input: []                                                                   
 Expected: (s/alt :i integer? :s string?)                                       
 Failure            
   Reason: Insufficient input           

----------------------------------------------------------------------          
nil                 
=>
=> (p/pinpoint (s/alt :two (s/cat :first integer? :second integer?) :three (s/cat :first integer? :second integer? :third integer?)) [1])                   
Detected 1 spec error:                  
----------------------------------------------------------------------          
(1/1)               

    Input: [1]      
 Expected: (s/alt   
            :two    
            (s/cat :first integer? :second integer?)                            
            :three  
            (s/cat :first integer? :second integer? :third integer?))           
 Failure            
   Reason: Insufficient input           

----------------------------------------------------------------------          
nil                 
=>

In both cases, the problematic part of the input isn't highlighted.