Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnalyzePatchSimple ¶
AnalyzePatchSimple returns just the meaningful additions and deletions
func IsCommentLine ¶
IsCommentLine checks if a line is a code comment (should not count as meaningful contribution)
func IsDocumentationFile ¶
IsDocumentationFile checks if a file is documentation-only
func IsMeaningfulLine ¶
IsMeaningfulLine checks if a line of code is meaningful (not a comment or whitespace)
func IsWhitespaceLine ¶
IsWhitespaceLine checks if a line contains only whitespace characters
Types ¶
type PatchStats ¶
type PatchStats struct {
TotalAdditions int
TotalDeletions int
MeaningfulAdditions int
MeaningfulDeletions int
CommentAdditions int
CommentDeletions int
WhitespaceAdditions int
WhitespaceDeletions int
}
PatchStats holds the results of analyzing a diff patch
func AnalyzePatch ¶
func AnalyzePatch(patch string) PatchStats
AnalyzePatch analyzes a unified diff patch and returns both raw and meaningful line counts. It parses diff hunks and categorizes each changed line as meaningful, comment, or whitespace.
Click to show internal directories.
Click to hide internal directories.