Skip to content

feat: add diff/patch "languages"#1332

Open
mdaniels5757 wants to merge 1 commit intoXAMPPRocky:masterfrom
mdaniels5757:add-diff
Open

feat: add diff/patch "languages"#1332
mdaniels5757 wants to merge 1 commit intoXAMPPRocky:masterfrom
mdaniels5757:add-diff

Conversation

@mdaniels5757
Copy link
Copy Markdown

My goal was to match cloc, which explains their methodology at https://github.com/AlDanial/cloc/blob/00ff5f1fbc84348ac45fb2841fd4c1274a02cfb0/cloc#L10303.

Basically, lines starting with a space are context, and these are counted as comments. Lines starting with "#", "---", or "+++" are also considered comments. Blank lines are counted as blanks. All other lines are patched lines, which are counted as code.

My goal was to match `cloc`, which explains their methodology at
https://github.com/AlDanial/cloc/blob/00ff5f1fbc84348ac45fb2841fd4c1274a02cfb0/cloc#L10303.

Basically, lines starting with a space are context, and these are counted as
comments. Lines starting with "#", "---", or "+++" are also considered comments.
Blank lines are counted as blanks. All other lines are patched lines,
which are counted as code.
@mdaniels5757 mdaniels5757 marked this pull request as ready for review February 24, 2026 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant