comments

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Overview

Package comments provides functions to know information about comments in a Golang project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentsMetrics

type CommentsMetrics struct {
	TotalLines             int     `json:"total_lines"`               // total of comment lines
	CommentsRatio          float64 `json:"ratio"`                     // ratio of comment lines (comments_loc / project_loc)
	FilesWithComments      int     `json:"files_with_comments"`       // number of files with comments
	FilesWithCommentsRatio float64 `json:"files_with_comments_ratio"` // ratio of files with comments
}

CommentsMetrics represents the comments stats in ao Golang project

func ResolveCommentsMetrics

func ResolveCommentsMetrics(prj *project.ProjectInfo) (*CommentsMetrics, error)

ResolveCommentsMetrics retrieves metrics about comments in the provided Golang project.

An error is returned when it's not possible to get the packages information

Jump to

Keyboard shortcuts

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