https://github.com/rubyworks/locat
LOCat
https://github.com/rubyworks/locat
Last synced: 6 months ago
JSON representation
LOCat
- Host: GitHub
- URL: https://github.com/rubyworks/locat
- Owner: rubyworks
- License: other
- Created: 2011-07-07T19:12:35.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2014-01-14T16:30:14.000Z (about 12 years ago)
- Last Synced: 2024-12-09T20:57:38.748Z (about 1 year ago)
- Language: Ruby
- Homepage: http://rubyworks.github.com/locat
- Size: 323 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# LOCat
[Homepage](http://rubyworks.github.com/locat) |
[Development](http://github.com/rubyworks/locat) |
[Issue Tracker](http://github.com/rubyworks/locat/issues) |
[Mailing List](http://groups.google.com/group/rubyworks-mailinglist)
[
](http://travis-ci.org/rubyworks/locat)
## 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.