-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathlanguage.go
More file actions
48 lines (41 loc) · 1.49 KB
/
language.go
File metadata and controls
48 lines (41 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package domain
// RepositoryLanguage represents a language in the Codacy API
type RepositoryLanguage struct {
Name string `json:"name"`
CodacyDefaults []string `json:"codacyDefaults"`
Extensions []string `json:"extensions"`
DefaultFiles []string `json:"defaultFiles"`
Enabled bool `json:"enabled"`
Detected bool `json:"detected"`
}
// LanguagesResponse represents the structure of the languages response
type LanguagesResponse struct {
Languages []RepositoryLanguage `json:"languages"`
}
// Language represents a processed language with combined extensions and files
type Language struct {
Name string
Extensions []string
Files []string
}
// LanguageTool represents a language tool with its file extensions from the API
type LanguageTool struct {
Name string `json:"name"`
FileExtensions []string `json:"fileExtensions"`
Files []string `json:"files"`
}
// LanguageToolsResponse represents the structure of the language tools API response
type LanguageToolsResponse struct {
Data []LanguageTool `json:"data"`
}
// ToolLanguageInfo contains language and extension information for a tool
type ToolLanguageInfo struct {
Name string `yaml:"name"`
Languages []string `yaml:"languages,flow"`
Extensions []string `yaml:"extensions,flow"`
Files []string `yaml:"files,flow"`
}
// LanguagesConfig represents the structure of the languages configuration file
type LanguagesConfig struct {
Tools []ToolLanguageInfo `yaml:"tools"`
}