Static code analysis tool for Common Lisp?

你离开我真会死。 提交于 2021-02-07 05:43:30

问题


I'm busy learning Common Lisp, & I'm looking for a static code analysis tool that will help me develop better style & avoid falling into common traps.

I've found Lisp Critic and I think it looks good, but I was hoping that someone may be able to recommend some other tools, and / or share their experiences with them.


回答1:


Given the dynamic nature of Lisp, static analysis is everything from tough to impossible, depending on the type of source code.

For some purposes I would recommend using the SBCL compiler. Check out its manual for what features it provides. One feature is some form of type inference. It provides also a lot of standard warnings for things like undeclared variables, type problems, calling functions with the wrong number of args, using undefined functions, violating the ANSI CL standard in various ways and more.




回答2:


The best way to learn about good style is to read a lot of code and ask for others to review your code. This isn't something that's specific to Common Lisp.




回答3:


I think that one gray tool is use lisp-critic, you can get some information here:

http://quickdocs.org/lisp-critic/

and a remake that was done by @Xach

http://xach.com/lisp/



来源:https://stackoverflow.com/questions/5987556/static-code-analysis-tool-for-common-lisp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!