8000 GitHub - guycipher/loc: Multiplatform program that counts lines of code in provided directory and or repository · GitHub
[go: up one dir, main page]

Skip to content
guycipherPublic

About

Multiplatform program that counts lines of code in provided directory and or repository

Topics

Resources

Stars

6 stars

Watchers

2 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

LOC

Simple program that counts lines of code in a directory or provided repository.

Usage

Build

go build -o loc main.go

Count lines of code in a provided directory

./loc -dir /path/to/directory

Count lines of code in a provided repository

./loc -repo github.com/username/repo

Exclude files and directories using regex patterns

# Exclude test files
./loc -dir /path/to/directory --exclude ".*_test\.go$" --exclude ".*\.spec\.ts$"

# Exclude multiple directories
./loc -dir /path/to/directory --exclude "node_modules/" --exclude "\.git/" --exclude "build/"

# Exclude generated files and test directories
./loc -dir /path/to/directory --exclude "gen/.*" --exclude "/tests/" --exclude ".*\.generated\."

# Multiple exclusions can be combined
./loc -dir /path/to/directory \
--exclude ".*_test\.go$" \
--exclude "node_modules/" \
--exclude "\.git/" \
--exclude "build/" \
--exclude "dist/"

Supported Languages

  • Go
  • Python
  • C
  • Java
  • Ruby
  • Rust
  • C#
  • JavaScript
  • TypeScript
  • PHP
  • HTML
  • CSS
  • Shell
  • Kotlin
  • Swift
  • Scala
  • Perl
  • R
  • Lua
  • Haskell
  • Objective-C
  • Groovy
  • Dart
  • Elixir
  • Erlang
  • Fortran
  • Pascal
  • MATLAB
  • Julia
  • SQL
  • JSON
  • XML
  • T-SQL
  • VHDL
  • COBOL
  • Assembly
  • ActionScript
  • VimL
  • Bash
  • Ada
  • Delphi
  • Smalltalk
  • Scheme
  • Clojure
  • F#
  • OCaml
  • Nim
  • Racket
  • C++

About

Multiplatform program that counts lines of code in provided directory and or repository

Topics

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0