Is there a method using Windows Powershell to calculate the total line count of code within a GitHub repository?
In a GitHub repository you can see “language statistics”, which displays the percentage of the project that’s written in a language. However, it does not show how many lines of code are in the repository, which is what I'm looking for.
I'm familiar with the git ls-files
command, which provides a list of files managed by git. However, my goal is to examine the content of each individual file, determine the number of lines within them, and then aggregate these counts.
The command git ls-files | xargs wc -l
works seamlessly on Linux systems, but however, when dealing with Windows, we might need to look for an effective substitute for xargs
to achieve a similar outcome.
I'm hoping there is a way to do this using just the Windows Powershell, and not relying on external tools such as cloc