Common Lisp 的静态代码分析工具?
我正忙着学习 Common Lisp,&我正在寻找一个静态代码分析工具,它将帮助我开发更好的样式和代码。避免陷入常见陷阱。
我找到了 Lisp Critic 我认为它看起来不错,但我希望有人可能会能够推荐一些其他工具,和/或与他们分享他们的经验。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
鉴于 Lisp 的动态特性,静态分析从困难到不可能,具体取决于源代码的类型。
出于某些目的,我建议使用 SBCL 编译器。查看其手册以了解其提供的功能。其中一个功能是某种形式的类型推断。它还针对未声明的变量、类型问题、使用错误数量的参数调用函数、使用未定义的函数、以各种方式违反 ANSI CL 标准等问题提供了许多标准警告。
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.
了解良好风格的最佳方法是阅读大量代码并要求其他人审查您的代码。这不是 Common Lisp 特有的东西。
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.
我认为一个灰色工具是使用 lisp-critic,你可以得到一些信息
这里:
http://quickdocs.org/lisp-critic/
以及@完成的重制Xach
http://xach.com/lisp/
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/