Skip to content

Replace sebastian/lines-of-code with custom code - #150

Merged
TomasVotruba merged 1 commit into
mainfrom
remove-lines-of-code
Oct 1, 2026
Merged

TomasVotruba merged 1 commit into
mainfrom
remove-lines-of-code

Conversation

@TomasVotruba

Copy link
Copy Markdown
Member

Drop the sebastian/lines-of-code runtime dependency (PHP 8.3 floor) in favor of a small in-house CommentLineCountingNodeVisitor.

Only linesOfCode() and commentLinesOfCode() were used. Total lines already came from resolveInitLinesOfCode(); the comment line count is now gathered in the same AST traversal as StructureNodeVisitor (one pass instead of two), replicating the original dedupe-by-token-position logic.

Behavior covered by the existing AnalyserTest (comment and line assertions unchanged).

One step toward running swiss-knife on PHP 7.4-8.5.

@TomasVotruba
TomasVotruba merged commit 7bbdea2 into main Oct 1, 2026
8 checks passed
@TomasVotruba
TomasVotruba deleted the remove-lines-of-code branch October 1, 2026 12:39
@TomasVotruba TomasVotruba mentioned this pull request Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant