filepkg

package
v0.0.0-...-d31700d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

View Source
var File = Rule{

	Name: namepkg.Rule{MaxLen: 30, Style: "lower_case"},
	Size: sizeRule{MaxLineWidth: 100, MaxCommentLineWidth: 120, MaxLines: 300},
	// contains filtered or unexported fields
}
View Source
var TestFile = Rule{

	Name: namepkg.Rule{MaxLen: 50, Style: "lower_case"},
	Size: sizeRule{MaxLineWidth: 100, MaxCommentLineWidth: 120, MaxLines: 600},
	// contains filtered or unexported fields
}

Functions

func Check

func Check(isTest bool, path, src string, astFile *ast.File, fileSet *token.FileSet)
Example
problems.Clear()
w := walker.New("file.go")
Check(false, "file.go", w.SrcFile, w.AstFile, w.FileSet)

w = walker.New("file_test.go")
Check(true, "file_test.go", w.SrcFile, w.AstFile, w.FileSet)

problems.Render()
Output:

Types

type Rule

type Rule struct {
	Name namepkg.Rule
	Size sizeRule
	// contains filtered or unexported fields
}

func (*Rule) Check

func (r *Rule) Check(path, src string, astFile *ast.File, fileSet *token.FileSet)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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