问题描述
当我使用C#或Perl,有一些有用的工具,如StyleCop,FxCop,Perl :: Critic和Perltidy。他们可以自动检查或格式化我的代码。然后,有没有任何等效的工具的Ruby或Rails?我在Google上找到了一些工具,但我觉得他们没有这么频繁。
When I use C# or Perl, there are some useful tools like StyleCop, FxCop, Perl::Critic and Perltidy. They can check or format my code automatically. Then, are there any equivalent tools for Ruby or Rails? I found some tools on Google, but I felt they are not maintained so frequently.
推荐答案
Ruby工具箱,位于。
There's some style checkers listed at in the Ruby toolbox at https://www.ruby-toolbox.com/categories/code_metrics .
此外,打开警告可以检查某些类型的错误代码。使用 $ VERBOSE = true
或使用。
Also, turning on warnings can check for some kinds of bad code. Do so with $VERBOSE = true
or by one of the ways listed here.
这篇关于Ruby / Rails的编码风格检查器或代码格式化程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!