Skip to content

Commit

Permalink
Count code lines and spec lines in make cl
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed May 1, 2018
1 parent d830ea3 commit 73cb36e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ NAME = \
VERSION = \
$(shell ruby -e "s = eval(File.read(Dir['*.gemspec'][0])); puts s.version")

count_lines:
find lib -name "*.rb" | xargs cat | ruby -e "p STDIN.readlines.count { |l| l = l.strip; l[0, 1] != '#' && l != '' }"
find spec -name "*_spec.rb" | xargs cat | ruby -e "p STDIN.readlines.count { |l| l = l.strip; l[0, 1] != '#' && l != '' }"
cl: count_lines

gemspec_validate:
@echo "---"
Expand Down

0 comments on commit 73cb36e

Please sign in to comment.