Documentation ¶
Index ¶
- type BazelRCPath
- type BazelRCReader
- type Command
- type CommandDoesNotTakeArgumentsError
- type CommandNotRecognizedError
- type ConfigExpansionContainsCycleError
- type ConfigValueNotRecognizedError
- type ConfigurationDirectives
- type FlagInvalidEnumValueError
- type FlagMissingValueError
- type FlagNotApplicableError
- type FlagNotRecognizedError
- type FlagUnexpectedValueError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BazelRCPath ¶
BazelRCPath holds a path at which a bazelrc configuration file is stored, and whether the file is required to exist. All bazelrc files are bazelrc files are optional, except for the ones provided to the --bazelrc startup flag.
func GetBazelRCPaths ¶
func GetBazelRCPaths(startupFlags *StartupFlags, startupFlagsPathFormat path.Format, workspacePath, homeDirectoryPath, workingDirectoryPath path.Parser) ([]BazelRCPath, error)
GetBazelRCPaths returns the paths of the bazelrc configuration files that should be evaluated, based on the startup flags, the workspace path and the user's home directory. This logic is consistent with https://bazel.build/run/bazelrc#bazelrc-file-locations.
type BazelRCReader ¶
type BazelRCReader struct {
// contains filtered or unexported fields
}
BazelRCReader is a reader for ".bazelrc" files. These files may list flags that need to be provided to Bazel, either by default or by providing --config= flags.
func NewBazelRCReader ¶
func NewBazelRCReader(r io.RuneReader) *BazelRCReader
NewBazelRCReader wraps an io.RuneReader, providing it a BazelRCReader that can be used to read lines from ".bazelrc" files.
func (*BazelRCReader) Read ¶
func (r *BazelRCReader) Read() ([]string, error)
Read the contents of the ".bazelrc" file, up to and including the next line that contains one or more fields of text.
type Command ¶
type Command interface {
Reset()
}
func ParseCommandAndArguments ¶
func ParseCommandAndArguments(configurationDirectives ConfigurationDirectives, args []string) (Command, error)
type CommandDoesNotTakeArgumentsError ¶
type CommandDoesNotTakeArgumentsError struct {
Command string
}
func (CommandDoesNotTakeArgumentsError) Error ¶
func (e CommandDoesNotTakeArgumentsError) Error() string
type CommandNotRecognizedError ¶
type CommandNotRecognizedError struct {
Command string
}
func (CommandNotRecognizedError) Error ¶
func (e CommandNotRecognizedError) Error() string
type ConfigExpansionContainsCycleError ¶
type ConfigExpansionContainsCycleError struct {
Directive string
}
func (ConfigExpansionContainsCycleError) Error ¶
func (e ConfigExpansionContainsCycleError) Error() string
type ConfigValueNotRecognizedError ¶
type ConfigValueNotRecognizedError struct {
Config string
}
func (ConfigValueNotRecognizedError) Error ¶
func (e ConfigValueNotRecognizedError) Error() string
type ConfigurationDirectives ¶
func ParseBazelRCFiles ¶
func ParseBazelRCFiles(bazelRCPaths []BazelRCPath, rootDirectory filesystem.Directory, pathFormat path.Format, workspacePath, workingDirectoryPath path.Parser) (ConfigurationDirectives, error)
type FlagInvalidEnumValueError ¶
func (FlagInvalidEnumValueError) Error ¶
func (e FlagInvalidEnumValueError) Error() string
type FlagMissingValueError ¶
type FlagMissingValueError struct {
Flag string
}
func (FlagMissingValueError) Error ¶
func (e FlagMissingValueError) Error() string
type FlagNotApplicableError ¶
type FlagNotApplicableError struct {
Flag string
}
func (FlagNotApplicableError) Error ¶
func (e FlagNotApplicableError) Error() string
type FlagNotRecognizedError ¶
type FlagNotRecognizedError struct {
Flag string
}
func (FlagNotRecognizedError) Error ¶
func (e FlagNotRecognizedError) Error() string
type FlagUnexpectedValueError ¶
type FlagUnexpectedValueError struct {
Flag string
}
func (FlagUnexpectedValueError) Error ¶
func (e FlagUnexpectedValueError) Error() string