On Jan 13, 2014, at 2:05 PM, Andy Fingerhut <andy.finger...@gmail.com> wrote:
> Eastwood's current use of :arglists for :wrong-arity linter checking is 
> definitely 'at odds' with the way java.jdbc and some other libraries use it 
> for clearer documentation of fn/macro args.
> 

Google seems to indicate that :arglists is used for all sorts of documentation 
clarifications and some libraries have pretty much arbitrary stuff in that 
metadata, based on the fact that clojure.repl/doc and autodoc and other tools 
don't parse it, they simply display it as-is :(

Sounds like Eastwood should ignore :arglists and just use the actual argument 
lists for the arity check, with perhaps an additional lint warning for when 
what's in :arglists doesn't match possible real signatures of the function? I 
can see the latter being useful on its own sometimes.

> As an example, I was considering that if a fn/macro explicitly chose to be 
> Eastwood-friendly in this way, it could have an :arglists and 
> :eastwood-arglists explicitly, for those few vars that replace their 
> :arglists. When one is using Eastwood with a library that they do not want to 
> modify in that way, there could be some extra config file for Eastwood where 
> one could specify these :eastwood-arglists.
> 

I'm not sure how I feel about a potential explosion of tool-specific metadata. 
Perhaps a single :eastwood map containing whatever flags are relevant for that 
tool? So in this case :eastwood {:arglists '(...)} to provide arglists-specific 
data to Eastwood which would also be a good place to add a way to exclude 
specific linters on a per-fn basis?

It found three bugs in our code on the first run so I'm figuring out a way to 
integrate it into our build as an additional QA step now :)

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to