aboutcode-org / scancode-toolkit

:mag: ScanCode detects licenses, copyrights, dependencies by "scanning code" ... to discover and inventory open source and third-party packages used in your code. Sponsored by NLnet project https://nlnet.nl/project/vulnerabilitydatabase, the Google Summer of Code, Azure credits, nexB and others generous sponsors!
https://github.com/aboutcode-org/scancode-toolkit/releases/
2.07k stars 537 forks source link

Report the number of lines in a text file #1350

Open pombredanne opened 5 years ago

pombredanne commented 5 years ago

Since scans (license and copyrights) typically return line ranges, it would be useful to return the number of lines if a file is a text file.

sritasngh commented 3 years ago

@pombredanne scans (license and copyrights) return line ranges for the text matched. When you say to include number of lines do you mean to add it for the whole file like here?

pombredanne commented 3 years ago

When you say to include number of lines do you mean to add it for the whole file like here?

yes, and we have some code to port and start from for this here https://github.com/nexB/scancode-toolkit-contrib/blob/develop/src/sourcecode/metrics.py

Siddhant-K-code commented 3 years ago

@itssingh will you like to work on it? or I can work upon it.

sritasngh commented 3 years ago

@itssingh will you like to work on it? or I can work upon it.

working on it:)