utils

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCLOCignoreFile

func CheckCLOCignoreFile(fileexclusion string, target string) (bool, error)

func CleanFileName

func CleanFileName(originalName string) string

func ConvertToMap

func ConvertToMap(arr []string) map[string]bool

func CreateGlobalReport

func CreateGlobalReport(directory string) error

func FormatCodeLines

func FormatCodeLines(numLines float64) string

func FormatSize

func FormatSize(size int64) string

func NewLogger

func NewLogger() *logrus.Logger

Types

type CustomFormatter

type CustomFormatter struct{}

func (*CustomFormatter) Format

func (f *CustomFormatter) Format(entry *logrus.Entry) ([]byte, error)

Format formate l'enregistrement log

type ExclusionList

type ExclusionList struct {
	Projects map[string]bool
	Repos    map[string]bool
}

func LoadExclusionList

func LoadExclusionList(filename string) (*ExclusionList, error)

type FileData

type FileData struct {
	Results []LanguageData1 `json:"Results"`
}

type Globalinfo

type Globalinfo struct {
	Organization           string `json:"Organization"`
	TotalLinesOfCode       string `json:"TotalLinesOfCode"`
	LargestRepository      string `json:"LargestRepository"`
	LinesOfCodeLargestRepo string `json:"LinesOfCodeLargestRepo"`
	DevOpsPlatform         string `json:"DevOpsPlatform"`
	NumberRepos            int    `json:"NumberRepos"`
}

type LanguageData

type LanguageData struct {
	Language   string  `json:"Language"`
	CodeLines  int     `json:"CodeLines"`
	Percentage float64 `json:"Percentage"`
	CodeLinesF string  `json:"CodeLinesF"`
}

func (*LanguageData) FormatCodeLines

func (l *LanguageData) FormatCodeLines()

type LanguageData1

type LanguageData1 struct {
	Language  string `json:"Language"`
	CodeLines int    `json:"CodeLines"`
}

Jump to

Keyboard shortcuts

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