config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config handles .arsrc.yml project-level configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProjectConfig

type ProjectConfig struct {
	Version   int                        `yaml:"version"`
	Scoring   scoringOverrides           `yaml:"scoring"`
	Languages []string                   `yaml:"languages"`
	Metrics   map[string]metricOverrides `yaml:"metrics"`
}

ProjectConfig represents the .arsrc.yml configuration file.

func LoadProjectConfig

func LoadProjectConfig(dir string, explicitPath string) (*ProjectConfig, error)

LoadProjectConfig loads project configuration from .arsrc.yml or .arsrc.yaml. If explicitPath is provided (from --config flag), that file is loaded. Otherwise, looks for .arsrc.yml then .arsrc.yaml in dir. Returns nil (no error) if no config file is found.

func (*ProjectConfig) ApplyToScoringConfig

func (c *ProjectConfig) ApplyToScoringConfig(sc *scoring.ScoringConfig)

ApplyToScoringConfig applies project config overrides to a ScoringConfig.

func (*ProjectConfig) Validate

func (c *ProjectConfig) Validate() error

Validate checks that the ProjectConfig values are valid.

Jump to

Keyboard shortcuts

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