mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Add support for stats breakdown by file per repo
This commit is contained in:
@@ -15,6 +15,12 @@ if File.directory?(path)
|
||||
percentage = sprintf '%.2f' % percentage
|
||||
puts "%-7s %s" % ["#{percentage}%", language]
|
||||
end
|
||||
puts
|
||||
breakdown = repo.breakdown_by_file
|
||||
breakdown.each do |lang, files|
|
||||
puts "#{lang}: #{files}"
|
||||
puts
|
||||
end
|
||||
elsif File.file?(path)
|
||||
blob = Linguist::FileBlob.new(path, Dir.pwd)
|
||||
type = if blob.text?
|
||||
|
||||
Reference in New Issue
Block a user