Skip to content

rubyworks/locat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LOCat

Homepage | Development | Issue Tracker | Mailing List

DESCRIPTION

LOCat is a fancy Lines-Of-Code analysis tool.

SYNOPSIS

Define a .locat Ruby script in your project, e.g.

match 'lib/**.rb' do |file, line|
  case line
  when /^\s*#/
    'Comment'
  when /^\s*$/
    'Blank'
  else
    'Code'
  end
end

match 'test/**.rb' do |file, line|
  case line
  when /^\s*#/
    'Comment'
  when /^\s*$/
    'Blank'
  else
    'Test'
  end
end

Then run locat, e.g.

$ locat -o locat.html

The config file can also be located at etc/locat.rb or config/locat.rb.

COPYRIGHT

Copyright (c) 2011 Rubyworks

BSD 2-Clause License

See LICENSE.md for details.