scanner

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileResult

type FileResult struct {
	Path       string
	Lines      int
	CodeLines  int
	BlankLines int
	Comments   int
}

type LanguageResult

type LanguageResult struct {
	Lines      int
	CodeLines  int
	BlankLines int
	Comments   int
}

type Scanner

type Scanner struct {
	SupportedLanguages language.Languages
}

func NewScanner

func NewScanner(languages language.Languages) *Scanner

func (*Scanner) Scan

func (sc *Scanner) Scan(files []analyzer.FileMetadata) ([]scanResult, error)

func (*Scanner) Summary

func (sc *Scanner) Summary(results []scanResult) *Summary

type Summary

type Summary struct {
	Languages       map[string]*LanguageResult
	Files           []FileResult
	FilesByLanguage map[string]int
	TotalFiles      int
	TotalLines      int
	TotalCodeLines  int
	TotalBlankLines int
	TotalComments   int
}

Jump to

Keyboard shortcuts

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