Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllLangsLock sync.Mutex
A mutex to protect the AllLanguages and AllLanguagesMap.
View Source
var AllLanguageAggregateStats = LanguageAggregateStats{}
Aggregate stats for all programming languages.
View Source
var AllLanguages []*Language
All programming language types detected by codetalks.
View Source
var AllLanguagesMap = map[string]uint{}
{ language-name: Language-index in AllLanguages list }
Functions ¶
func AnalyzeAllLanguages ¶
func AnalyzeAllLanguages()
AnalyzeAllLanguages analyzes all code files and accumulates the data.
Types ¶
type Language ¶
type Language struct {
// Cloc data
CodeCount uint32 `json:"code"`
CommentCount uint32 `json:"comment_count"`
BlankCount uint32 `json:"blank_count"`
TotalLines uint32 `json:"total_lines"`
FileCount uint32 `json:"file_count"`
CodeFiles []*file.CodeFile
// Language metadata
Name string `json:"name"`
FileExtension string `json:"file_extension"`
}
Language represents a programming language.
func GetLanguage ¶
type LanguageAggregateStats ¶
type LanguageAggregateStats struct {
TotalFiles uint32 `json:"total_files"`
TotalLines uint32 `json:"total_lines"`
TotalCode uint32 `json:"total_code"`
TotalComment uint32 `json:"total_comment"`
TotalBlank uint32 `json:"total_blank"`
}
LanguageAggregateStats represents the aggregate statistics of all programming languages.
Click to show internal directories.
Click to hide internal directories.