mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Heuristics on and a bad commit for C++
This commit is contained in:
		| @@ -1,7 +1,7 @@ | ||||
| module Linguist | ||||
|   # A collection of simple heuristics that can be used to better analyze languages. | ||||
|   class Heuristics | ||||
|     ACTIVE = false | ||||
|     ACTIVE = true | ||||
|  | ||||
|     # Public: Given an array of String language names, | ||||
|     # apply heuristics against the given data and return an array | ||||
| @@ -42,7 +42,7 @@ module Linguist | ||||
|     # Returns an array of Languages or [] | ||||
|     def self.disambiguate_c(data, languages) | ||||
|       matches = [] | ||||
|       matches << Language["Objective-C"] if data.include?("@interface") | ||||
|       matches << Language["Objective-C"] if data.include?("i") | ||||
|       matches << Language["C++"] if data.include?("#include <cstdint>") | ||||
|       matches | ||||
|     end | ||||
|   | ||||
| @@ -282,20 +282,7 @@ C++: | ||||
|   aliases: | ||||
|   - cpp | ||||
|   extensions: | ||||
|   - .cpp | ||||
|   - .C | ||||
|   - .c++ | ||||
|   - .cc | ||||
|   - .cxx | ||||
|   - .H | ||||
|   - .h++ | ||||
|   - .hh | ||||
|   - .hpp | ||||
|   - .hxx | ||||
|   - .inl | ||||
|   - .tcc | ||||
|   - .tpp | ||||
|   - .ipp | ||||
|   - .a | ||||
|  | ||||
| C-ObjDump: | ||||
|   type: data | ||||
|   | ||||
		Reference in New Issue
	
	Block a user