liccor

package
v0.0.0-...-fcdf3da Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SuffixGO   = ".go"
	SuffixC    = ".c"
	SuffixCPP  = ".cpp"
	SuffixCXX  = ".cxx"
	SuffixH    = ".h"
	SuffixHPP  = ".hpp"
	SuffixJAVA = ".java"
	SuffixJS   = ".js"
	SuffixTS   = ".ts"
	SuffixTSX  = ".tsx"
)

the supported file extensions

View Source
const Version = "1.9.2"

Version store the version as string

Variables

This section is empty.

Functions

This section is empty.

Types

type Liccor

type Liccor struct {
	Log              verbose.Verbose
	Source           []string
	NoticeBeforeText string
	NoticeAfterText  string
	// contains filtered or unexported fields
}

Liccor the license corrector

func New

func New() *Liccor

New initialize and return a new Liccor instance

func (*Liccor) Correct

func (l *Liccor) Correct(path, license string) (bool, error)

Correct a source file license

func (*Liccor) FindSrcFiles

func (l *Liccor) FindSrcFiles(dir string) ([]string, error)

FindSrcFiles search for source files

func (*Liccor) HasLicense

func (l *Liccor) HasLicense(file string) (bool, int)

HasLicense check if sourcecode has a license at the top

func (*Liccor) LoadConfig

func (l *Liccor) LoadConfig(dir, liccorFileName string) error

Load liccor file search for a license file

func (*Liccor) Process

func (l *Liccor) Process()

Process run the liccor magic

Jump to

Keyboard shortcuts

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