mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Lines of code can be 100,000+ in a Rails app
Actually, our app has 400,000 LOC 💥
This commit is contained in:
parent
22e0a22d5f
commit
293bd95c3e
1 changed files with 4 additions and 4 deletions
|
@ -71,12 +71,12 @@ class CodeStatistics #:nodoc:
|
|||
|
||||
def print_header
|
||||
print_splitter
|
||||
puts "| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |"
|
||||
puts "| Name | Lines | LOC | Classes | Methods | M/C | LOC/M |"
|
||||
print_splitter
|
||||
end
|
||||
|
||||
def print_splitter
|
||||
puts "+----------------------+-------+-------+---------+---------+-----+-------+"
|
||||
puts "+----------------------+--------+--------+---------+---------+-----+-------+"
|
||||
end
|
||||
|
||||
def print_line(name, statistics)
|
||||
|
@ -84,8 +84,8 @@ class CodeStatistics #:nodoc:
|
|||
loc_over_m = (statistics.code_lines / statistics.methods) - 2 rescue loc_over_m = 0
|
||||
|
||||
puts "| #{name.ljust(20)} " \
|
||||
"| #{statistics.lines.to_s.rjust(5)} " \
|
||||
"| #{statistics.code_lines.to_s.rjust(5)} " \
|
||||
"| #{statistics.lines.to_s.rjust(6)} " \
|
||||
"| #{statistics.code_lines.to_s.rjust(6)} " \
|
||||
"| #{statistics.classes.to_s.rjust(7)} " \
|
||||
"| #{statistics.methods.to_s.rjust(7)} " \
|
||||
"| #{m_over_c.to_s.rjust(3)} " \
|
||||
|
|
Loading…
Reference in a new issue