Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

locr

Counts the number of files, lines, lines of code (LOC) and bytes for a single file or a directory, grouped by file extension.

locr is a cross-platform .NET 8 console application.

Usage

locr [path] [options]

If no path is supplied, the current directory is analysed.

Arguments

Argument Description
path Path to a file or directory to analyse. Defaults to the current directory.

Options

Option Description
-p, --path <path> Path to a file or directory to analyse.
-m, --match <regex> Only files matched by the supplied regular expression will be scanned.
-i, --include <pattern> Only include files that pass the wildcard search, e.g. *.cs
-d, --matchdir <regex> Only directories matched by the supplied regular expression will be scanned.
-v, --verbosity <level> Output verbosity level. 0=None, 1=Chatty Neighbor, 2=Gossip Columnist. Default is 0.
-r, --recurse Recurse subfolders contained in the provided path.
-h, --help Show help information.

Options may be supplied as --name value or --name=value.

Example

>locr .\src -r

locr 0.3.0.0
----------------------------------------------------------------------------------------------------
Scanning: .\src
Directories:40
Files:222 (Scanned:221, Ignored:1)
221 files scanned in 119ms, (1857 files/sec)
----------------------------------------------------------------------------------------------------
Extension           Files               Lines               LOC                 Bytes
.cs                 11                  811                 609                 28,687
.csproj             2                   42                  32                  1,327
.json               12                  2,894               2,874               144,628
.sln                1                   29                  26                  1,458
...
----------------------------------------------------------------------------------------------------
Total:              222                 4,718               4,447               8,188,500
----------------------------------------------------------------------------------------------------

Building

Requires the .NET 8 SDK.

dotnet build src/locr.sln -c Release

Running the tests

dotnet test src/locr.sln -c Release

Running from source

dotnet run --project src/locr -c Release -- [path] [options]

About

Counts the number of lines and blanks per single file or directory.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages