contracts

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enforcer

type Enforcer interface {
	Check(comment ParsedComment) error
}

type EnforcerConfig

type EnforcerConfig struct {
	Now    time.Time
	Strict bool
}

type FileProcessor

type FileProcessor[T any] func(filepath string) (T, error)

type FilesProcessor

type FilesProcessor[T any] interface {
	ProcessFiles(files []string) (map[string]T, error)
}

type FilesProcessorConfig

type FilesProcessorConfig[T any] struct {
	Processor            FileProcessor[T]
	Recursive            bool
	FilesExcludePatterns []string
}

type ParsedComment

type ParsedComment struct {
	CommentPrefix string
	Prefix        string
	Content       string
	Expiry        *time.Time
	LineNumber    uint
	OriginalLine  string
}

type Parser

type Parser interface {
	Parse(fileContent string) ([]ParsedComment, error)
}

type ParsingConfig

type ParsingConfig struct {
	CommentPrefixes []string
	Prefixes        []string
	ExpiryPattern   string
	CaseSensitive   bool
	DateLayout      string
}

Jump to

Keyboard shortcuts

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