languages

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package languages provides shared language detection markers used by both the indexer (bare-repo language detection) and the SCIP service (project directory discovery). Keeping the canonical list in one place avoids drift between the two subsystems.

Index

Constants

This section is empty.

Variables

View Source
var All = []Language{
	{Name: "go", Markers: []string{"go.mod"}},
	{Name: "typescript", Markers: []string{"tsconfig.json"}},
	{Name: "javascript", Markers: []string{"package.json"}},
	{Name: "rust", Markers: []string{"Cargo.toml"}},
	{Name: "java", Markers: []string{"pom.xml", "build.gradle", "build.gradle.kts"}},
	{Name: "python", Markers: []string{"pyproject.toml", "setup.py", "requirements.txt"}},
	{Name: "php", Markers: []string{"composer.json"}},
}

All is the ordered list of supported languages. The order defines detection priority — more specific languages come first.

Functions

func MarkersByLanguage

func MarkersByLanguage() map[string][]string

MarkersByLanguage returns a map from language name to its marker files.

func Priority

func Priority() []string

Priority returns language names in detection order.

Types

type Language

type Language struct {
	Name    string
	Markers []string
}

Language describes a programming language and the files whose presence at a project root indicates the language is in use.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL