Live data from Hacker News

RuboCop – A Ruby static code analyzer

batsov.com

21–30 of 39 posts

Re: RuboCop – A Ruby static code analyzer

#21

Earlier quoted context omitted.

This is starting to pick up steam in the node community, and represents the coding style of a vast percentage of core and popular npm modules: https://github.com/feross/standard It's not configurable, is a drop-in executable tool and supports a --format option which will attempt to reformat your code. To me it seems to be inspired by gofmt.

Looks cool except for the no semi colons thing. The first time I spend fifteen minutes searching for why this weird bug was happening only to realize it was because of ASI, that shit is going in the trash.

Apparently it will catch the edge cases for you.

https://github.com/feross/standard/issues/5#issuecomment-716...

Re: RuboCop – A Ruby static code analyzer

#22
At GitLab we recently implemented this in our tests. After this all the reminders and comments about style are no longer needed. You just need to have green tests as you always should. We think having it in CI is a much better experience than a HoundCI that makes line comments in the merge request, that gets quite noisy for people following the MR.

Re: RuboCop – A Ruby static code analyzer

#24
Absolutely amazing tool, always part of my CI build for Ruby projects.

Even though in a lot of cases I don't care as much about the style used per se, it's a treat to have a consistent coding style in projects with multiple team members.

Re: RuboCop – A Ruby static code analyzer

#27
I'm a casual ruby programmer (I only use it to write "powerful bash scripts") and have been using rubocop with vim/syntastic.

The attention to detail is incredible, which I'm not sure if I like or not, since it usually feels like I have someone nitpicking about the style of my quick scripts.

I've been learning a lot about ruby standards though.

Re: RuboCop – A Ruby static code analyzer

#28

RuboCop's author here. If I knew someone would ever link to the homepage I would have put some useful info in it. :-) Thanks for the kind words! P.S. There's a lot more info here https://github.com/bbatsov/rubocop

bozhidar also is the maintainer of CIDER [1] for Emacs + Clojure. It's the most popular way to use Clojure.

[1] https://github.com/clojure-emacs/cider

Re: RuboCop – A Ruby static code analyzer

#30

So what is it, a static code analyzer or a style checker?

AFAIR it's more of a linter ("unreachable code after an end" or "assignment in condition") than a static analyzer a-la findbugs ("X might be null here" or "access to a field before initialization").
Post reply on HN