Heuristics on and a bad commit for C++

This commit is contained in:
Arfon Smith
2014-08-06 19:22:16 +01:00
parent 417bf7e1c9
commit 8cdb8ed48d
2 changed files with 3 additions and 16 deletions

View File

@@ -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

View File

@@ -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