Documentation ¶
Index ¶
- func FileToCoverageItems(logger hclog.Logger, file string) ([]*proto.CoverageItem, error)
- func IsHeader(fset *token.FileSet, cg *ast.CommentGroup, b *proto.Block) bool
- func IsInline(fset *token.FileSet, cg *ast.CommentGroup, b *proto.Block) bool
- func IsOnlyNoLintAnnotation(str string) bool
- func Normalize(str string) string
- func ProcessFileCoverage(file string, fset *token.FileSet, f *ast.File) []*proto.CoverageItem
- func ProcessFunctionCoverage(file string, fset *token.FileSet, f *ast.File, fdecl *ast.FuncDecl) *proto.CoverageItem
- func ProcessPackageCoverage(file string, fset *token.FileSet, f *ast.File) *proto.CoverageItem
- func ProcessTypeCoverage(file string, fset *token.FileSet, f *ast.File, gdecl *ast.GenDecl) []*proto.CoverageItem
- func ProcessVariableCoverage(file string, fset *token.FileSet, f *ast.File, gdecl *ast.GenDecl) []*proto.CoverageItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileToCoverageItems ¶
func FileToCoverageItems(logger hclog.Logger, file string) ([]*proto.CoverageItem, error)
FileToCoverageItems is the logic of the plugin. it converts file to CoverageItems.
func IsHeader ¶
IsHeader returns true if the given *ast.CommentGroup is belonged to the given *proto.Block as HeaderComments.
func IsInline ¶
IsInline returns true if the given *ast.CommentGroup is belonged to the given *proto.Block as InlineComments.
func IsOnlyNoLintAnnotation ¶ added in v0.0.3
func ProcessFileCoverage ¶
ProcessFileCoverage measures the comment coverage for the entire given file.
func ProcessFunctionCoverage ¶
func ProcessFunctionCoverage(file string, fset *token.FileSet, f *ast.File, fdecl *ast.FuncDecl) *proto.CoverageItem
ProcessFunctionCoverage measures the comment coverage of functions.
func ProcessPackageCoverage ¶
ProcessPackageCoverage measures the package level comment coverage.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.