mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge branch 'master' into 891
This commit is contained in:
@@ -62,7 +62,8 @@ module Linguist
|
||||
generated_protocol_buffer? ||
|
||||
generated_jni_header? ||
|
||||
composer_lock? ||
|
||||
node_modules?
|
||||
node_modules? ||
|
||||
vcr_cassette?
|
||||
end
|
||||
|
||||
# Internal: Is the blob an XCode project file?
|
||||
@@ -235,5 +236,15 @@ module Linguist
|
||||
def composer_lock?
|
||||
!!name.match(/composer.lock/)
|
||||
end
|
||||
|
||||
# Is the blob a VCR Cassette file?
|
||||
#
|
||||
# Returns true or false
|
||||
def vcr_cassette?
|
||||
return false unless extname == '.yml'
|
||||
return false unless lines.count > 2
|
||||
# VCR Cassettes have "recorded_with: VCR" in the second last line.
|
||||
return lines[-2].include?("recorded_with: VCR")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,9 +19,15 @@ module Linguist
|
||||
if languages.all? { |l| ["Perl", "Prolog"].include?(l) }
|
||||
disambiguate_pl(data, languages)
|
||||
end
|
||||
if languages.all? { |l| ["ECL", "Prolog"].include?(l) }
|
||||
disambiguate_ecl(data, languages)
|
||||
end
|
||||
if languages.all? { |l| ["TypeScript", "XML"].include?(l) }
|
||||
disambiguate_ts(data, languages)
|
||||
end
|
||||
if languages.all? { |l| ["Common Lisp", "OpenCL"].include?(l) }
|
||||
disambiguate_cl(data, languages)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -43,6 +49,13 @@ module Linguist
|
||||
matches
|
||||
end
|
||||
|
||||
def self.disambiguate_ecl(data, languages)
|
||||
matches = []
|
||||
matches << Language["Prolog"] if data.include?(":-")
|
||||
matches << Language["ECL"] if data.include?(":=")
|
||||
matches
|
||||
end
|
||||
|
||||
def self.disambiguate_ts(data, languages)
|
||||
matches = []
|
||||
if (data.include?("</translation>"))
|
||||
@@ -53,6 +66,13 @@ module Linguist
|
||||
matches
|
||||
end
|
||||
|
||||
def self.disambiguate_cl(data, languages)
|
||||
matches = []
|
||||
matches << Language["Common Lisp"] if data.include?("(defun ")
|
||||
matches << Language["OpenCL"] if /\/\* |\/\/ |^\}/.match(data)
|
||||
matches
|
||||
end
|
||||
|
||||
def self.active?
|
||||
!!ACTIVE
|
||||
end
|
||||
|
||||
@@ -53,6 +53,18 @@ ASP:
|
||||
- .aspx
|
||||
- .axd
|
||||
|
||||
ATS:
|
||||
type: programming
|
||||
color: "#1ac620"
|
||||
primary_extension: .dats
|
||||
lexer: OCaml
|
||||
aliases:
|
||||
- ats2
|
||||
extensions:
|
||||
- .atxt
|
||||
- .hats
|
||||
- .sats
|
||||
|
||||
ActionScript:
|
||||
type: programming
|
||||
lexer: ActionScript 3
|
||||
@@ -92,6 +104,8 @@ AppleScript:
|
||||
primary_extension: .applescript
|
||||
extensions:
|
||||
- .scpt
|
||||
interpreters:
|
||||
- osascript
|
||||
|
||||
Arc:
|
||||
type: programming
|
||||
@@ -115,6 +129,12 @@ AsciiDoc:
|
||||
- .adoc
|
||||
- .asc
|
||||
|
||||
AspectJ:
|
||||
type: programming
|
||||
lexer: AspectJ
|
||||
color: "#1957b0"
|
||||
primary_extension: .aj
|
||||
|
||||
Assembly:
|
||||
type: programming
|
||||
lexer: NASM
|
||||
@@ -214,6 +234,7 @@ C:
|
||||
color: "#555"
|
||||
primary_extension: .c
|
||||
extensions:
|
||||
- .cats
|
||||
- .w
|
||||
|
||||
C#:
|
||||
@@ -239,6 +260,7 @@ C++:
|
||||
extensions:
|
||||
- .C
|
||||
- .c++
|
||||
- .cc
|
||||
- .cxx
|
||||
- .H
|
||||
- .h++
|
||||
@@ -284,7 +306,7 @@ COBOL:
|
||||
|
||||
CSS:
|
||||
ace_mode: css
|
||||
color: "#1f085e"
|
||||
color: "#563d7c"
|
||||
primary_extension: .css
|
||||
|
||||
Ceylon:
|
||||
@@ -296,6 +318,16 @@ ChucK:
|
||||
lexer: Java
|
||||
primary_extension: .ck
|
||||
|
||||
Cirru:
|
||||
type: programming
|
||||
color: "#aaaaff"
|
||||
primary_extension: .cirru
|
||||
# ace_mode: cirru
|
||||
# lexer: Cirru
|
||||
lexer: Text only
|
||||
extensions:
|
||||
- .cr
|
||||
|
||||
Clean:
|
||||
type: programming
|
||||
color: "#3a81ad"
|
||||
@@ -316,6 +348,7 @@ Clojure:
|
||||
- .cljscm
|
||||
- .cljx
|
||||
- .hic
|
||||
- .cljs.hl
|
||||
filenames:
|
||||
- riemann.config
|
||||
|
||||
@@ -333,6 +366,8 @@ CoffeeScript:
|
||||
- .iced
|
||||
filenames:
|
||||
- Cakefile
|
||||
interpreters:
|
||||
- coffee
|
||||
|
||||
ColdFusion:
|
||||
type: programming
|
||||
@@ -463,6 +498,9 @@ Dylan:
|
||||
type: programming
|
||||
color: "#3ebc27"
|
||||
primary_extension: .dylan
|
||||
extensions:
|
||||
- .intr
|
||||
- .lid
|
||||
|
||||
Ecere Projects:
|
||||
type: data
|
||||
@@ -528,6 +566,14 @@ F#:
|
||||
- .fsi
|
||||
- .fsx
|
||||
|
||||
FLUX:
|
||||
type: programming
|
||||
color: "#33CCFF"
|
||||
primary_extension: .fx
|
||||
lexer: Text only
|
||||
extensions:
|
||||
- .flux
|
||||
|
||||
FORTRAN:
|
||||
type: programming
|
||||
lexer: Fortran
|
||||
@@ -566,7 +612,7 @@ Fancy:
|
||||
- .fancypack
|
||||
filenames:
|
||||
- Fakefile
|
||||
|
||||
|
||||
Fantom:
|
||||
type: programming
|
||||
color: "#dbded5"
|
||||
@@ -627,6 +673,17 @@ Glyph:
|
||||
lexer: Tcl
|
||||
primary_extension: .glf
|
||||
|
||||
Gnuplot:
|
||||
type: programming
|
||||
color: "#f0a9f0"
|
||||
lexer: Gnuplot
|
||||
primary_extension: .gp
|
||||
extensions:
|
||||
- .gnu
|
||||
- .gnuplot
|
||||
- .plot
|
||||
- .plt
|
||||
|
||||
Go:
|
||||
type: programming
|
||||
color: "#a89b4d"
|
||||
@@ -653,6 +710,8 @@ Groovy:
|
||||
ace_mode: groovy
|
||||
color: "#e69f56"
|
||||
primary_extension: .groovy
|
||||
interpreters:
|
||||
- groovy
|
||||
|
||||
Groovy Server Pages:
|
||||
group: Groovy
|
||||
@@ -670,6 +729,7 @@ HTML:
|
||||
extensions:
|
||||
- .htm
|
||||
- .xhtml
|
||||
- .html.hl
|
||||
|
||||
HTML+Django:
|
||||
type: markup
|
||||
@@ -723,7 +783,7 @@ Harbour:
|
||||
lexer: Text only
|
||||
color: "#0e60e3"
|
||||
primary_extension: .hb
|
||||
|
||||
|
||||
Haskell:
|
||||
type: programming
|
||||
color: "#29b544"
|
||||
@@ -818,6 +878,13 @@ JSON5:
|
||||
lexer: JavaScript
|
||||
primary_extension: .json5
|
||||
|
||||
JSONLD:
|
||||
type: data
|
||||
group: JavaScript
|
||||
ace_mode: json
|
||||
lexer: JavaScript
|
||||
primary_extension: .jsonld
|
||||
|
||||
Jade:
|
||||
group: HTML
|
||||
type: markup
|
||||
@@ -840,7 +907,7 @@ Java Server Pages:
|
||||
JavaScript:
|
||||
type: programming
|
||||
ace_mode: javascript
|
||||
color: "#f15501"
|
||||
color: "#f7df1e"
|
||||
aliases:
|
||||
- js
|
||||
- node
|
||||
@@ -848,6 +915,7 @@ JavaScript:
|
||||
extensions:
|
||||
- ._js
|
||||
- .bones
|
||||
- .es6
|
||||
- .jake
|
||||
- .jsfl
|
||||
- .jsm
|
||||
@@ -859,6 +927,8 @@ JavaScript:
|
||||
- .ssjs
|
||||
filenames:
|
||||
- Jakefile
|
||||
interpreters:
|
||||
- node
|
||||
|
||||
Julia:
|
||||
type: programming
|
||||
@@ -1005,6 +1075,18 @@ Markdown:
|
||||
- .mkdown
|
||||
- .ron
|
||||
|
||||
Mask:
|
||||
type: markup
|
||||
lexer: SCSS
|
||||
color: "#f97732"
|
||||
ace_mode: scss
|
||||
primary_extension: .mask
|
||||
|
||||
Mathematica:
|
||||
type: programming
|
||||
primary_extension: .mathematica
|
||||
lexer: Text only
|
||||
|
||||
Matlab:
|
||||
type: programming
|
||||
color: "#bb92ac"
|
||||
@@ -1184,7 +1266,7 @@ PAWN:
|
||||
lexer: C++
|
||||
color: "#dbb284"
|
||||
primary_extension: .pwn
|
||||
|
||||
|
||||
PHP:
|
||||
type: programming
|
||||
ace_mode: php
|
||||
@@ -1307,6 +1389,9 @@ Prolog:
|
||||
type: programming
|
||||
color: "#74283c"
|
||||
primary_extension: .prolog
|
||||
extensions:
|
||||
- .ecl
|
||||
- .pl
|
||||
|
||||
Protocol Buffer:
|
||||
type: markup
|
||||
@@ -1370,6 +1455,7 @@ R:
|
||||
primary_extension: .r
|
||||
extensions:
|
||||
- .R
|
||||
- .rsx
|
||||
filenames:
|
||||
- .Rprofile
|
||||
interpreters:
|
||||
@@ -1483,6 +1569,7 @@ Ruby:
|
||||
- Appraisals
|
||||
- Berksfile
|
||||
- Gemfile
|
||||
- Gemfile.lock
|
||||
- Guardfile
|
||||
- Podfile
|
||||
- Thorfile
|
||||
@@ -1534,6 +1621,7 @@ Scheme:
|
||||
color: "#1e4aec"
|
||||
primary_extension: .scm
|
||||
extensions:
|
||||
- .sld
|
||||
- .sls
|
||||
- .ss
|
||||
interpreters:
|
||||
@@ -1572,6 +1660,12 @@ Shell:
|
||||
filenames:
|
||||
- Dockerfile
|
||||
|
||||
Shen:
|
||||
type: programming
|
||||
color: "#120F14"
|
||||
lexer: Text only
|
||||
primary_extension: .shen
|
||||
|
||||
Slash:
|
||||
type: programming
|
||||
color: "#007eff"
|
||||
@@ -1611,6 +1705,15 @@ SuperCollider:
|
||||
lexer: Text only
|
||||
primary_extension: .scd
|
||||
|
||||
SystemVerilog:
|
||||
type: programming
|
||||
color: "#343761"
|
||||
lexer: systemverilog
|
||||
primary_extension: .sv
|
||||
extensions:
|
||||
- .svh
|
||||
- .vh
|
||||
|
||||
TOML:
|
||||
type: data
|
||||
primary_extension: .toml
|
||||
@@ -1789,6 +1892,7 @@ XML:
|
||||
- .kml
|
||||
- .launch
|
||||
- .mxml
|
||||
- .osm
|
||||
- .plist
|
||||
- .pluginspec
|
||||
- .ps1xml
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@
|
||||
## Vendor Conventions ##
|
||||
|
||||
# Caches
|
||||
- cache/
|
||||
- (^|/)cache/
|
||||
|
||||
# Dependencies
|
||||
- ^[Dd]ependencies/
|
||||
@@ -47,6 +47,9 @@
|
||||
# Debian packaging
|
||||
- ^debian/
|
||||
|
||||
# Haxelib projects often contain a neko bytecode file named run.n
|
||||
- run.n$
|
||||
|
||||
## Commonly Bundled JavaScript frameworks ##
|
||||
|
||||
# jQuery
|
||||
@@ -63,6 +66,9 @@
|
||||
- (^|/)controls\.js$
|
||||
- (^|/)dragdrop\.js$
|
||||
|
||||
# Typescript definition files
|
||||
- (.*?)\.d\.ts$
|
||||
|
||||
# MooTools
|
||||
- (^|/)mootools([^.]*)\d+\.\d+.\d+([^.]*)\.js$
|
||||
|
||||
@@ -92,6 +98,9 @@
|
||||
# AngularJS
|
||||
- (^|/)angular([^.]*)(\.min)?\.js$
|
||||
|
||||
# React
|
||||
- (^|/)react(-[^.]*)?(\.min)?\.js$
|
||||
|
||||
## Python ##
|
||||
|
||||
# django
|
||||
@@ -111,6 +120,13 @@
|
||||
# Sparkle
|
||||
- (^|/)Sparkle/
|
||||
|
||||
## Groovy ##
|
||||
|
||||
# Gradle
|
||||
- (^|/)gradlew$
|
||||
- (^|/)gradlew\.bat$
|
||||
- (^|/)gradle/wrapper/
|
||||
|
||||
## .NET ##
|
||||
|
||||
# Visual Studio IntelliSense
|
||||
|
||||
Reference in New Issue
Block a user