mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
fixing typo
This commit is contained in:
@@ -154,7 +154,7 @@ module Linguist
|
||||
# Public: Is the blob a generated file?
|
||||
#
|
||||
# Generated source code is supressed in diffs and is ignored by
|
||||
# langauge statistics.
|
||||
# language statistics.
|
||||
#
|
||||
# Requires Blob#data
|
||||
#
|
||||
|
||||
@@ -3,10 +3,10 @@ require 'linguist/lexer'
|
||||
require 'yaml'
|
||||
|
||||
module Linguist
|
||||
# Langage names that are recognizable by GitHub. Defined languages
|
||||
# Language names that are recognizable by GitHub. Defined languages
|
||||
# can be highlighted, searched and listed under the Top Languages page.
|
||||
#
|
||||
# Langages are defined in `lib/linguist/langages.yml`.
|
||||
# Languages are defined in `lib/linguist/languages.yml`.
|
||||
class Language
|
||||
@languages = []
|
||||
@index = {}
|
||||
@@ -201,7 +201,7 @@ module Linguist
|
||||
# If group name is set, save the name so we can lazy load it later
|
||||
if attributes[:group_name]
|
||||
if major?
|
||||
warn "#{name} is a major langauage, it should not be grouped with #{attributes[:group_name]}"
|
||||
warn "#{name} is a major language, it should not be grouped with #{attributes[:group_name]}"
|
||||
end
|
||||
|
||||
@group = nil
|
||||
@@ -315,7 +315,7 @@ module Linguist
|
||||
|
||||
# Public: Is it a minor language?
|
||||
#
|
||||
# Minor langauage include variants of major languages and
|
||||
# Minor language include variants of major languages and
|
||||
# markup languages like HTML and YAML.
|
||||
#
|
||||
# Returns true or false
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# extension - An Array of associated extensions
|
||||
# major - Boolean flag major programming languages
|
||||
# searchable - Boolean flag to enable searching (defaults to true)
|
||||
# search_term - Deprecated: Some langauges maybe indexed under a
|
||||
# search_term - Deprecated: Some languages maybe indexed under a
|
||||
# different alias. Avoid defining new exceptions.
|
||||
#
|
||||
# Any additions or modifications (even trivial) should have corresponding
|
||||
|
||||
@@ -4,7 +4,7 @@ require 'linguist/mime'
|
||||
module Linguist
|
||||
# Similar to ::Pathname, Linguist::Pathname wraps a path string and
|
||||
# provides helpful query methods. Its useful when you only have a
|
||||
# filename but not a blob and need to figure out the langauge of the file.
|
||||
# filename but not a blob and need to figure out the language of the file.
|
||||
class Pathname
|
||||
# Public: Initialize a Pathname
|
||||
#
|
||||
@@ -52,7 +52,7 @@ module Linguist
|
||||
# Pathname.new('file.rb').language
|
||||
# # => Language['Ruby']
|
||||
#
|
||||
# Returns a Langauge or nil if none was found.
|
||||
# Returns a Language or nil if none was found.
|
||||
def language
|
||||
@language ||= Language.find_by_filename(@path)
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ module Linguist
|
||||
# A Repository is an abstraction of a Grit::Repo or a basic file
|
||||
# system tree. It holds a list of paths pointing to Blobish objects.
|
||||
#
|
||||
# Its primary purpose is for gathering langauge statistics across
|
||||
# Its primary purpose is for gathering language statistics across
|
||||
# the entire project.
|
||||
class Repository
|
||||
# Public: Initialize a new Repository from a File directory
|
||||
@@ -49,12 +49,12 @@ module Linguist
|
||||
@paths[path]
|
||||
end
|
||||
|
||||
# Public: Returns a breakdown of langauge stats.
|
||||
# Public: Returns a breakdown of language stats.
|
||||
#
|
||||
# Examples
|
||||
#
|
||||
# # => { Langauge['Ruby'] => 46319,
|
||||
# Langauge['JavaScript'] => 258 }
|
||||
# # => { Language['Ruby'] => 46319,
|
||||
# Language['JavaScript'] => 258 }
|
||||
#
|
||||
# Returns a Hash of Language keys and Integer size values.
|
||||
def languages
|
||||
@@ -88,7 +88,7 @@ module Linguist
|
||||
# Skip vendored or generated blobs
|
||||
next if blob.vendored? || blob.generated? || blob.language.nil?
|
||||
|
||||
# Get langauge group
|
||||
# Get language group
|
||||
language = blob.language.group
|
||||
|
||||
# Only include major languages
|
||||
|
||||
Reference in New Issue
Block a user