rulemode

package
v0.0.0-...-5811ad1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package rulemode defines the tool configuration options that affect rules.

Index

Constants

This section is empty.

Variables

View Source
var Types = map[Type]struct{}{
	Strict:                   empty,
	Specification:            empty,
	Permissive:               empty,
	LibraryManagerSubmission: empty,
	LibraryManagerIndexed:    empty,
	LibraryManagerIndexing:   empty,
	Official:                 empty,
	Default:                  empty,
}

Types provides an iterator and validator for Type.

Functions

func Compliance

func Compliance(ruleModes map[Type]bool) string

Compliance returns the tool configuration's compliance setting name.

func ComplianceModeFromString

func ComplianceModeFromString(complianceModeString string) (bool, bool, bool, error)

ComplianceModeFromString parses the --compliance flag value and returns the corresponding rule mode settings.

func LibraryManager

func LibraryManager(ruleModes map[Type]bool) string

LibraryManager returns the string identifier for the Library Manager configuration mode.

func LibraryManagerModeFromString

func LibraryManagerModeFromString(libraryManagerModeString string) (bool, bool, bool, error)

LibraryManagerModeFromString parses the --library-manager flag value and returns the corresponding rule mode settings.

func Modes

func Modes(defaultRuleModes map[projecttype.Type]map[Type]bool, customRuleModes map[Type]bool, superprojectType projecttype.Type) map[Type]bool

Modes merges the default rule mode values for the given superproject type with any user-specified rule mode settings.

Types

type Type

type Type int

Type is the type for rule modes.

const (
	Strict                   Type = iota // strict
	Specification                        // specification
	Permissive                           // permissive
	LibraryManagerSubmission             // submit
	LibraryManagerIndexed                // update
	LibraryManagerIndexing               // ARDUINO_LINT_LIBRARY_MANAGER_INDEXING
	Official                             // ARDUINO_LINT_OFFICIAL
	Default                              // default
)

func (Type) String

func (i Type) String() string

Jump to

Keyboard shortcuts

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