language

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoTestFound indicates that no tests could be found.
	ErrNoTestFound = errors.New("no tests could be found")
)

Common errors over all languages.

View Source
var Languages = map[string]Language{}

Languages holds a register of all languages.

Functions

func Register

func Register(language Language)

Register adds a language to the common language list.

Types

type Language

type Language interface {
	// ID returns the unique ID of this language.
	ID() (id string)
	// Name is the prose name of this language.
	Name() (id string)

	// Files returns a list of relative file paths of the repository that should be evaluated.
	Files(repositoryPath string) (filePaths []string, err error)

	// Execute invokes the language specific testing on the given repository.
	Execute(repositoryPath string) (coverage float64, err error)
}

Language defines a language to evaluate a repository.

type LanguageGolang

type LanguageGolang struct{}

LanguageGolang holds a Go language to evaluate a repository.

func (*LanguageGolang) Execute

func (language *LanguageGolang) Execute(repositoryPath string) (coverage float64, err error)

Execute invokes the language specific testing on the given repository.

func (*LanguageGolang) Files

func (language *LanguageGolang) Files(repositoryPath string) (filePaths []string, err error)

Files returns a list of relative file paths of the repository that should be evaluated.

func (*LanguageGolang) ID

func (language *LanguageGolang) ID() (id string)

ID returns the unique ID of this language.

func (*LanguageGolang) Name

func (language *LanguageGolang) Name() (id string)

Name is the prose name of this language.

Jump to

Keyboard shortcuts

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