mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge pull request #1732 from github/filename-matches-multiple-langages
Require samples if filename matches multiple languages
This commit is contained in:
@@ -431,11 +431,6 @@ module Linguist
|
||||
# Returns the extensions Array
|
||||
attr_reader :filenames
|
||||
|
||||
# Public: Return all possible extensions for language
|
||||
def all_extensions
|
||||
(extensions + [primary_extension]).uniq
|
||||
end
|
||||
|
||||
# Deprecated: Get primary extension
|
||||
#
|
||||
# Defaults to the first extension but can be overridden
|
||||
@@ -593,9 +588,9 @@ module Linguist
|
||||
:ace_mode => options['ace_mode'],
|
||||
:wrap => options['wrap'],
|
||||
:group_name => options['group'],
|
||||
:searchable => options.key?('searchable') ? options['searchable'] : true,
|
||||
:searchable => options.fetch('searchable', true),
|
||||
:search_term => options['search_term'],
|
||||
:extensions => [options['extensions'].first] + options['extensions'][1..-1].sort,
|
||||
:extensions => Array(options['extensions']),
|
||||
:interpreters => options['interpreters'].sort,
|
||||
:filenames => options['filenames'],
|
||||
:popular => popular.include?(name)
|
||||
|
||||
@@ -33,15 +33,6 @@ AGS Script:
|
||||
- .ash
|
||||
tm_scope: source.c++
|
||||
|
||||
Ant Build System:
|
||||
type: data
|
||||
tm_scope: text.xml.ant
|
||||
extensions:
|
||||
- .ant.xml
|
||||
filenames:
|
||||
- build.xml
|
||||
- ant.xml
|
||||
|
||||
ANTLR:
|
||||
type: programming
|
||||
color: "#9DC3FF"
|
||||
@@ -117,6 +108,13 @@ Alloy:
|
||||
extensions:
|
||||
- .als
|
||||
|
||||
Ant Build System:
|
||||
type: data
|
||||
tm_scope: text.xml.ant
|
||||
filenames:
|
||||
- ant.xml
|
||||
- build.xml
|
||||
|
||||
ApacheConf:
|
||||
type: markup
|
||||
aliases:
|
||||
@@ -649,13 +647,6 @@ E:
|
||||
extensions:
|
||||
- .E
|
||||
|
||||
Ecere Projects:
|
||||
type: data
|
||||
group: JavaScript
|
||||
extensions:
|
||||
- .epj
|
||||
tm_scope: source.json
|
||||
|
||||
ECL:
|
||||
type: programming
|
||||
color: "#8a1267"
|
||||
@@ -671,6 +662,13 @@ Eagle:
|
||||
- .brd
|
||||
tm_scope: text.xml
|
||||
|
||||
Ecere Projects:
|
||||
type: data
|
||||
group: JavaScript
|
||||
extensions:
|
||||
- .epj
|
||||
tm_scope: source.json
|
||||
|
||||
Eiffel:
|
||||
type: programming
|
||||
color: "#946d57"
|
||||
@@ -767,8 +765,8 @@ Factor:
|
||||
extensions:
|
||||
- .factor
|
||||
filenames:
|
||||
- .factor-rc
|
||||
- .factor-boot-rc
|
||||
- .factor-rc
|
||||
|
||||
Fancy:
|
||||
type: programming
|
||||
@@ -812,13 +810,6 @@ G-code:
|
||||
- .gco
|
||||
- .gcode
|
||||
|
||||
Game Maker Language:
|
||||
type: programming
|
||||
color: "#8ad353"
|
||||
extensions:
|
||||
- .gml
|
||||
tm_scope: source.js
|
||||
|
||||
GAMS:
|
||||
type: programming
|
||||
extensions:
|
||||
@@ -863,6 +854,13 @@ GLSL:
|
||||
- .vrx
|
||||
- .vshader
|
||||
|
||||
Game Maker Language:
|
||||
type: programming
|
||||
color: "#8ad353"
|
||||
extensions:
|
||||
- .gml
|
||||
tm_scope: source.js
|
||||
|
||||
Genshi:
|
||||
extensions:
|
||||
- .kid
|
||||
@@ -1122,9 +1120,14 @@ INI:
|
||||
aliases:
|
||||
- dosini
|
||||
|
||||
Inno Setup:
|
||||
IRC log:
|
||||
search_term: irc
|
||||
aliases:
|
||||
- irc
|
||||
- irc logs
|
||||
extensions:
|
||||
- .iss
|
||||
- .irclog
|
||||
- .weechatlog
|
||||
|
||||
Idris:
|
||||
type: programming
|
||||
@@ -1147,15 +1150,6 @@ Inno Setup:
|
||||
extensions:
|
||||
- .iss
|
||||
|
||||
IRC log:
|
||||
search_term: irc
|
||||
aliases:
|
||||
- irc
|
||||
- irc logs
|
||||
extensions:
|
||||
- .irclog
|
||||
- .weechatlog
|
||||
|
||||
Io:
|
||||
type: programming
|
||||
color: "#a9188d"
|
||||
@@ -1474,9 +1468,9 @@ Makefile:
|
||||
- .mak
|
||||
- .mk
|
||||
filenames:
|
||||
- makefile
|
||||
- Makefile
|
||||
- GNUmakefile
|
||||
- Makefile
|
||||
- makefile
|
||||
interpreters:
|
||||
- make
|
||||
|
||||
@@ -1529,8 +1523,6 @@ Matlab:
|
||||
Maven POM:
|
||||
type: data
|
||||
tm_scope: text.xml.pom
|
||||
extensions:
|
||||
- .pom.xml
|
||||
filenames:
|
||||
- pom.xml
|
||||
|
||||
@@ -1832,6 +1824,14 @@ Parrot:
|
||||
extensions:
|
||||
- .parrot # Dummy extension
|
||||
|
||||
Parrot Assembly:
|
||||
group: Parrot
|
||||
type: programming
|
||||
aliases:
|
||||
- pasm
|
||||
extensions:
|
||||
- .pasm
|
||||
|
||||
Parrot Internal Representation:
|
||||
group: Parrot
|
||||
tm_scope: source.parrot.pir
|
||||
@@ -1841,14 +1841,6 @@ Parrot Internal Representation:
|
||||
extensions:
|
||||
- .pir
|
||||
|
||||
Parrot Assembly:
|
||||
group: Parrot
|
||||
type: programming
|
||||
aliases:
|
||||
- pasm
|
||||
extensions:
|
||||
- .pasm
|
||||
|
||||
Pascal:
|
||||
type: programming
|
||||
color: "#b0ce4e"
|
||||
@@ -2005,10 +1997,10 @@ Python:
|
||||
- .wsgi
|
||||
- .xpy
|
||||
filenames:
|
||||
- wscript
|
||||
- SConstruct
|
||||
- SConscript
|
||||
- BUILD
|
||||
- SConscript
|
||||
- SConstruct
|
||||
- wscript
|
||||
interpreters:
|
||||
- python
|
||||
|
||||
@@ -2588,8 +2580,8 @@ VimL:
|
||||
filenames:
|
||||
- .vimrc
|
||||
- _vimrc
|
||||
- vimrc
|
||||
- gvimrc
|
||||
- vimrc
|
||||
|
||||
Visual Basic:
|
||||
type: programming
|
||||
@@ -2691,12 +2683,12 @@ XML:
|
||||
filenames:
|
||||
- .classpath
|
||||
- .project
|
||||
- Web.Debug.config
|
||||
- Web.Release.config
|
||||
- Web.config
|
||||
- build.xml.dist
|
||||
- packages.config
|
||||
- phpunit.xml.dist
|
||||
- Web.config
|
||||
- Web.Debug.config
|
||||
- Web.Release.config
|
||||
|
||||
XProc:
|
||||
type: programming
|
||||
|
||||
Reference in New Issue
Block a user