mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Forgot to move hidden samples to the correct dir
This commit is contained in:
@@ -597,8 +597,6 @@ INI:
|
||||
- .prefs
|
||||
- .properties
|
||||
primary_extension: .ini
|
||||
filenames:
|
||||
- .gitconfig
|
||||
|
||||
IRC log:
|
||||
lexer: IRC logs
|
||||
@@ -1116,12 +1114,7 @@ Shell:
|
||||
- zsh
|
||||
primary_extension: .sh
|
||||
filenames:
|
||||
- .bash_profile
|
||||
- .bashrc
|
||||
- .profile
|
||||
- .zlogin
|
||||
- .zsh
|
||||
- .zshrc
|
||||
- bashrc
|
||||
- zshrc
|
||||
|
||||
@@ -1238,8 +1231,6 @@ VimL:
|
||||
extensions:
|
||||
- .vim
|
||||
filenames:
|
||||
- .gvimrc
|
||||
- .vimrc
|
||||
- vimrc
|
||||
- gvimrc
|
||||
|
||||
@@ -1307,8 +1298,6 @@ YAML:
|
||||
extensions:
|
||||
- .yaml
|
||||
- .yml
|
||||
filenames:
|
||||
- .gemrc
|
||||
|
||||
eC:
|
||||
type: programming
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,10 @@ module Linguist
|
||||
})
|
||||
end
|
||||
else
|
||||
if File.extname(filename) == ""
|
||||
raise "#{File.join(dirname, filename)} is missing an extension, maybe it belongs in filenames/ subdir"
|
||||
end
|
||||
|
||||
yield({
|
||||
:path => File.join(dirname, filename),
|
||||
:language => category,
|
||||
@@ -68,18 +72,16 @@ module Linguist
|
||||
each do |sample|
|
||||
language_name = sample[:language]
|
||||
|
||||
# TODO: For now skip empty extnames
|
||||
if sample[:extname] && sample[:extname] != ""
|
||||
if sample[:extname]
|
||||
db['extnames'][language_name] ||= []
|
||||
if !db['extnames'][language_name].include?(sample[:extname])
|
||||
db['extnames'][language_name] << sample[:extname]
|
||||
end
|
||||
end
|
||||
|
||||
# TODO: For now skip empty extnames
|
||||
if fn = sample[:filename]
|
||||
if sample[:filename]
|
||||
db['filenames'][language_name] ||= []
|
||||
db['filenames'][language_name] << fn
|
||||
db['filenames'][language_name] << sample[:filename]
|
||||
end
|
||||
|
||||
data = File.read(sample[:path])
|
||||
|
||||
Reference in New Issue
Block a user