Merge branch 'master' into associate-heuristic-with-extension

This commit is contained in:
Paul Chaignon
2015-07-04 22:48:06 +02:00
parent 8bf1defdc1
commit e688c865bc
50 changed files with 4387 additions and 55694 deletions

View File

@@ -69,8 +69,9 @@ module Linguist
generated_protocol_buffer? ||
generated_apache_thrift? ||
generated_jni_header? ||
generated_unity3d_meta? ||
vcr_cassette?
vcr_cassette? ||
generated_module? ||
generated_unity3d_meta?
end
# Internal: Is the blob an Xcode file?
@@ -324,6 +325,24 @@ module Linguist
return lines[0].include?("Generated by Cython")
end
# Internal: Is it a KiCAD or GFortran module file?
#
# KiCAD module files contain:
# PCBNEW-LibModule-V1 yyyy-mm-dd h:mm:ss XM
# on the first line.
#
# GFortran module files contain:
# GFORTRAN module version 'x' created from
# on the first line.
#
# Return true of false
def generated_module?
return false unless extname == '.mod'
return false unless lines.count > 1
return lines[0].include?("PCBNEW-LibModule-V") ||
lines[0].include?("GFORTRAN module version '")
end
# Internal: Is this a metadata file from Unity3D?
#
# Unity3D Meta files start with:

View File

@@ -285,6 +285,16 @@ module Linguist
end
end
disambiguate ".mod" do |data|
if data.include?('<!ENTITY ')
Language["XML"]
elsif /MODULE\s\w+\s*;/i.match(data) || /^\s*END \w+;$/i.match(data)
Language["Modula-2"]
else
[Language["Linux Kernel Module"], Language["AMPL"]]
end
end
disambiguate ".nl" do |data|
if /^(b|g)[0-9]+ /.match(data)
Language["NL"]

View File

@@ -49,6 +49,7 @@ AMPL:
color: "#E6EFBB"
extensions:
- .ampl
- .mod
tm_scope: source.ampl
ace_mode: text
@@ -1359,7 +1360,7 @@ Haskell:
Haxe:
type: programming
ace_mode: haxe
color: "#f7941e"
color: "#df7900"
extensions:
- .hx
- .hxsl
@@ -1475,6 +1476,14 @@ Isabelle:
tm_scope: source.isabelle.theory
ace_mode: text
Isabelle ROOT:
type: programming
group: Isabelle
filenames:
- ROOT
tm_scope: source.isabelle.root
ace_mode: text
J:
type: programming
color: "#9EEDFF"
@@ -1638,7 +1647,7 @@ Kit:
Kotlin:
type: programming
color: "#EA4DFA"
color: "#F18E33"
extensions:
- .kt
- .ktm
@@ -1759,6 +1768,13 @@ Linker Script:
tm_scope: none
ace_mode: text
Linux Kernel Module:
type: data
extensions:
- .mod
tm_scope: none
ace_mode: text
Liquid:
type: markup
extensions:
@@ -2025,6 +2041,13 @@ Modelica:
tm_scope: source.modelica
ace_mode: text
Modula-2:
type: programming
extensions:
- .mod
tm_scope: source.modula2
ace_mode: text
Module Management System:
type: programming
extensions:
@@ -2768,7 +2791,7 @@ Racket:
Ragel in Ruby Host:
type: programming
color: "#e17600"
color: "#9d5200"
extensions:
- .rl
aliases:
@@ -2919,6 +2942,25 @@ SCSS:
extensions:
- .scss
SMT:
type: programming
extensions:
- .smt2
- .smt
interpreters:
- boolector
- cvc4
- mathsat5
- opensmt
- smtinterpol
- smt-rat
- stp
- verit
- yices2
- z3
tm_scope: source.smt
ace_mode: text
SPARQL:
type: data
tm_scope: source.sparql
@@ -3506,6 +3548,7 @@ XML:
- .launch
- .mdpolicy
- .mm
- .mod
- .mxml
- .nproj
- .nuspec

View File

@@ -150,9 +150,10 @@ module Linguist
next if delta.binary
if [:added, :modified].include? delta.status
# Skip submodules
# Skip submodules and symlinks
mode = delta.new_file[:mode]
next if (mode & 040000) != 0
mode_format = (mode & 0170000)
next if mode_format == 0120000 || mode_format == 040000 || mode_format == 0160000
blob = Linguist::LazyBlob.new(repository, delta.new_file[:oid], new, mode.to_s(8))

View File

@@ -70,6 +70,7 @@
- 3rd[-_]?party/
- vendors?/
- extern(al)?/
- (^|/)[Vv]+endor/
# Debian packaging
- ^debian/
@@ -172,6 +173,13 @@
# Sparkle
- (^|/)Sparkle/
# Crashlytics
- Crashlytics.framework/
# Fabric
- Fabric.framework/
## Groovy ##
# Gradle

View File

@@ -1,3 +1,3 @@
module Linguist
VERSION = "4.5.6"
VERSION = "4.5.7"
end