Nicer breakdown output

This commit is contained in:
Ted Nyman
2013-12-29 23:56:13 -08:00
parent 40c04c8f6f
commit 49f29a53c0
2 changed files with 19 additions and 5 deletions

View File

@@ -47,11 +47,21 @@ These stats are also printed out by the `linguist` binary. You can use the
You can try running `linguist` on the `lib/` directory in this repository itself:
$ bundle exec linguist lib/ --breakdown
100% Ruby
Ruby: ["linguist/blob_helper.rb", "linguist/classifier.rb", "linguist/file_blob.rb", "linguist/generated.rb",
"linguist/heuristics.rb", "linguist/language.rb", "linguist/md5.rb", "linguist/repository.rb",
"linguist/samples.rb", "linguist/tokenizer.rb", "linguist.rb"]
100.00% Ruby
Ruby:
linguist/blob_helper.rb
linguist/classifier.rb
linguist/file_blob.rb
linguist/generated.rb
linguist/heuristics.rb
linguist/language.rb
linguist/md5.rb
linguist/repository.rb
linguist/samples.rb
linguist/tokenizer.rb
linguist.rb
#### Ignore vendored files

View File

@@ -28,7 +28,11 @@ if File.directory?(path)
puts
file_breakdown = repo.breakdown_by_file
file_breakdown.each do |lang, files|
puts "#{lang}: #{files}"
puts "#{lang}:"
files.each do |file|
puts file
end
puts
end
end
elsif File.file?(path)