Giter Site home page Giter Site logo

loc-stats's Introduction

loc-stats

A lil' cli tool to get stats about your codebase, e.g. number of lines of code, lines of code per language, etc.

Example usage:

loc-stats .
loc-stats --json --gitignore=false /path/to/dir

Example output:


    __                      __        __
   / /___  _____      _____/ /_____ _/ /______
  / / __ \/ ___/_____/ ___/ __/ __ `/ __/ ___/
 / / /_/ / /__/_____(__  ) /_/ /_/ / /_(__  )
/_/\____/\___/     /____/\__/\__,_/\__/____/


Lines of code: 1913     Number of files: 11

Rust            1330    69.52%
JSON             479    25.03%
Markdown          72     3.76%
TOML              21     1.09%
Shell             10     0.52%
Other              1     0.05%

Options

$ loc-stats --help

loc-stats 0.1.0

USAGE:
    loc-stats [OPTIONS] <PATH>

ARGS:
    <PATH>

OPTIONS:
        --gitignore <GITIGNORE>    Ignores files listed in .gitignore. Defaults to true [possible
                                   values: true, false]
    -h, --help                     Print help information
    -j, --json                     Gives the output in JSON format
    -V, --version                  Print version information

Installation

  1. Clone this repo.
  2. Run cargo build --release
  3. Add target/release/loc-stats to your path.

Features

  • Shows total number of lines of code, number of files and LOC grouped by language.
  • Supports omitting files listed in .gitignore
  • JSON output format with --json option

Testing

Run tests with:

cargo test

loc-stats's People

Contributors

mieszkosabo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.