Forgot to move hidden samples to the correct dir

This commit is contained in:
Joshua Peek
2012-08-03 15:25:38 -05:00
parent 96267e8696
commit 4531103033
15 changed files with 734 additions and 725 deletions

View File

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

View File

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