mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Prettier print
This commit is contained in:
		
							
								
								
									
										5
									
								
								Rakefile
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Rakefile
									
									
									
									
									
								
							| @@ -35,7 +35,7 @@ namespace :benchmark do | |||||||
|   task :run do |   task :run do | ||||||
|     reference, compare = ENV['compare'].split('...') |     reference, compare = ENV['compare'].split('...') | ||||||
|     puts "Comparing #{reference}...#{compare}" |     puts "Comparing #{reference}...#{compare}" | ||||||
|     abort("Unstaged changes") if git.status.changed.any? |     abort("Unstaged changes - aborting") if git.status.changed.any? | ||||||
|  |  | ||||||
|     # Get the current branch |     # Get the current branch | ||||||
|     # Would like to get this from the Git gem |     # Would like to get this from the Git gem | ||||||
| @@ -80,11 +80,12 @@ namespace :benchmark do | |||||||
|     languages = Dir.glob('benchmark/samples/*') |     languages = Dir.glob('benchmark/samples/*') | ||||||
|  |  | ||||||
|     languages.each do |lang| |     languages.each do |lang| | ||||||
|  |       puts "" | ||||||
|       puts "Starting with #{lang}" |       puts "Starting with #{lang}" | ||||||
|       results[lang] = {} |       results[lang] = {} | ||||||
|       files = Dir.glob("#{lang}/*") |       files = Dir.glob("#{lang}/*") | ||||||
|       files.each do |file| |       files.each do |file| | ||||||
|         puts file |         puts "  #{file}" | ||||||
|         result = IO::popen("bundle exec linguist #{file} --simple").read |         result = IO::popen("bundle exec linguist #{file} --simple").read | ||||||
|         filename = File.basename(file) |         filename = File.basename(file) | ||||||
|         if result.chomp.empty? # No results |         if result.chomp.empty? # No results | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user