Is there a lint for Common Lisp or Chicken Scheme?
Asked Answered
N

5

24

Is there a lint for Common Lisp or Chicken Scheme? Possibly something akin to C's splint, Haskell's HLint, Perl's B::Lint, etc.?

Natatory answered 1/8, 2011 at 0:23 Comment(6)
When I do some searches, I see something called SCL or SCL Lint, which I'm not sure if that's still extant, and the following: cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/tools/…Wandawander
That's really cool, but how do we use it? Is it like B::Lint, i.e. just load it before loading the code to check?Natatory
blush I don't know, I just did some web searches... :D That's a different question.Wandawander
I'm porting this to modern CL, Quicklisp, etc. How can I access si:definition-type-name in the different CL implementations? Ditto for compiler:style-checker?Natatory
I don't have a clue as far as C-Lisp, seriously. I couldn't do a hello world. If you have a specific question that you need an answer to, I suggest raising a question that answers that question, and/or trying it yourself and asking questions when you meet a dead-end. I'm sorry if my response made you think I could answer the question, but that's not a reality in this case. Please, create a new question for your inquiries; I was focusing on C-Lisp Lint parsers. Also note, in some circumstances you're better off deleting a question than editing it.Wandawander
From a very quick glance at the code, it looks like it is meant to be integrated into the Symbolics programming environment, and pretty specific to it. What the (defun (compiler:style-checker ...) ...) stuff probably does is define some kind of hook into the built-in style-checking framework provided by the Symbolics Common Lisp compiler. It is not at all clear whether and how it could be adapted to some other CL implementation. That said, the checking rules themselves could probably be lifted somehow if you were to write your own lint-like tool.Fairtrade
B
11

There's Lisp Critic:

http://www.mail-archive.com/[email protected]/msg00372.html

Bobbiebobbin answered 24/11, 2011 at 16:6 Comment(0)
B
5

There is a static debugger for PLT Scheme, called "MrSpidey", and "bugloo" if you are using the "Bigloo" Scheme compiler, but that is all I could find. see this Stack Overflow question about static analyzers for scheme.

Beauvais answered 1/8, 2011 at 0:23 Comment(0)
U
4

Specifically for CHICKEN Scheme, in the 4 series a "scrutinizer" has been added, which will perform (limited) flow analysis of your data types. Especially if you put your code inside a module (making the code a "closed world" so to speak), it can be extremely helpful in detecting type mistakes.

In 4.9.0 and later the scrutinizer is enabled by default. In older versions, you can enable it through the -scrutinize command line option.

Unbonnet answered 25/6, 2015 at 6:46 Comment(0)
S
3

No, there is nothing like that for Common Lisp.

Stapler answered 1/8, 2011 at 10:9 Comment(2)
Well, there's the SBCL compiler that's pretty good at giving all sorts of warnings I would expect from a linter for (say) C.Mock
There's XREF (cs.cmu.edu/Groups/AI/lang/lisp/code/tools/xref/0.html), but the link to the actual code gives a permission error.Natatory
M
2

sblint ? A linter for Common Lisp, based on SBCL.

Merete answered 22/6, 2019 at 15:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.