Documentation ¶
Index ¶
- Constants
- func Debugf(msg string, args ...any)
- func Errorf(msg string, args ...any)
- func Execute(config Config) error
- func Infof(msg string, args ...any)
- func LoggerWith(key string, value any) *logrus.Entry
- func LoggerWithError(err error) *logrus.Entry
- func SetLogLevel(verbose, debug bool)
- func Warnf(msg string, args ...any)
- type Config
- type RepositoryNode
- type RepositoryNodeHandler
- type RepositoryWalker
- type RuleEngine
- type RuleFormat
Constants ¶
View Source
const ( REPOSITORY_PATH_PLACEHOLDER = "$REPOSITORY" REPOSITORY_SANE_DEFAULT_FILE = ".sane" )
View Source
const (
MaxRules = 1000
)
View Source
const (
RULES_FORMAT_GITIGNORE = "gitignore"
)
Variables ¶
This section is empty.
Functions ¶
func LoggerWithError ¶
func SetLogLevel ¶
func SetLogLevel(verbose, debug bool)
Types ¶
type Config ¶
type Config struct { RepositoryPath string RulesPath string RulesType RuleFormat FailFast bool Strict bool }
type RepositoryNode ¶
type RepositoryNode struct {
FullPath string
}
type RepositoryNodeHandler ¶
type RepositoryNodeHandler func(RepositoryNode) error
type RepositoryWalker ¶
type RepositoryWalker interface {
Walk(RepositoryNodeHandler) error
}
type RuleEngine ¶
type RuleEngine interface { // Validate a single repository node with the loaded rules // This validation should be performed in a stateless manner Validate(RepositoryNode) (bool, error) // Finalize the validation state (if any) and return error (if any) Finalize() error // Reset validatin state Reset() }
type RuleFormat ¶
type RuleFormat string
Click to show internal directories.
Click to hide internal directories.