Where can I find an actively developed lint tool for Ruby?

后端 未结 9 924
别跟我提以往
别跟我提以往 2020-12-12 19:27

Most of the code I write is in Ruby, and every once in a while, I make some typo which only gets caught after a while. This is irritating when I have my scripts running long

9条回答
  •  一生所求
    2020-12-12 20:04

    Yes. Test::Unit

    Ok, I know you already know this and that in some sense this is a non-helpful answer, but you do bring up the negative consequence of duck typing, that there kind of is (at this time) no way around just writing more tests than something like Java might need.

    So, for the record, see Test::Unit in the Ruby Standard Library or one of the other test frameworks.

    Having unit tests that you can run and rerun is the best way to catch errors, and you do need more of them (tests, not errors :-) in dynamic languages like Ruby...

提交回复
热议问题