Skip to content
/ lines Public

Blazingly FAST concurrent line of code counter created in GO

License

Notifications You must be signed in to change notification settings

Moderrek/lines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ Blazingly FAST Line Counter

GitHub License Go GitHub Downloads (all assets, all releases)

Blazing-fast concurrent line counter for developers who value speed and efficiency. 🚀
Concurrent non-blank line counter implemented in GO using lightweight execution threads.

🚀 Why Lines?

  • Speed: Processes large directories with tens of thousands of files in milliseconds.
  • Concurrency: Takes full advantage of modern CPUs with Go's goroutines.
  • Precision: Counts only non-blank lines for accurate metrics.

⚙️ Usage

lines            # Prints file with the most lines at current directory
lines --dir      # Path to the analysis folder
lines --top N    # Prints the top N files
lines --hidden   # Allow to analyze hidden files & dirs
lines --version  # Prints installed version
lines --help     # Prints help
lines --no-color # Disables colored standard output

📈 Example output

lines --dir C:\Users\Moderr\dev --top 5
Analyzing.. C:\Users\Moderr\dev

.java | Lines of code: 24409
.json | Lines of code: 8828
.yaml | Lines of code: 4980
.tsx | Lines of code: 4357
.yml | Lines of code: 1122

Time taken: 27.157ms to analyze 79 635 files

📸 Screenshots

Example Usage

🖥️ Quick Start

Requires

  • Installed Git
  • Installed GO

Steps

  1. Clone repository
    git clone https://github.com/Moderrek/lines
  2. Run
    go run main.go

© License

MIT License

Copyright (c) 2024 Tymon Woźniak

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.