oinume journal

Scratchpad of what I learned

ruby-lint - Static syntax checker for Ruby

Recently I found static syntax checker for Ruby called ruby-lint. We haven't had such a syntax checker for Ruby, so I'm very happy to find it. (Although it's alpha quality)

Installation

$ gem install ruby-lint

Try

Prepare following ruby code.

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
a = 'hoge'
puts "hello" + b

ruby-lint it!!

$ ruby-lint hoge.rb
hoge.rb: error: line 4, column 15: undefined local variable or method b
hoge.rb: warning: line 3, column 0: assigned but unused local variable a

I cheer an author of ruby-lint. This is a great software!

The Rapid Rubyist (English Edition)

The Rapid Rubyist (English Edition)