Giter VIP home page Giter VIP logo

sloc's Introduction

SLOC - Source Lines Of Code

sloc is a simple, do-one-thing-well program to calculate code statistics: the number of lines in a project, and how much of that is code versus comment.

$ sloc ~/misc/opt/go
    Language  Files    Code  Comment  Blank   Total
       Total   2808  512357    87177  67791  667325
          Go   2048  295054    62020  37973  395047
           C    474  166702    22330  21849  210881
        HTML     58   25627      183   4241   30051
    Assembly    131    9974      161   1491   11626
        YACC      6    5245      363    449    6057
      Python      6    2940      789    495    4224
  JavaScript      6    2526      496    585    3607
         XML      9     974       15     90    1079
       Shell      9     905      380    155    1440
         CSS      6     899       24    119    1042
        Perl      9     854      159    135    1148
        Bash     13     483      151    122     756
        Make     33     174      106     87     367

sloc cannot understand gitignore or hgignore, nor can it distinguish between "real" source and auto-generated files, so for best results, run it on a fresh repository with no compilation done.

You can generate JSON output with the -json flag, if that's easy to parse in the programming/scripting language of your choice.

Install sloc with:

$ go get git.bytbox.net/sloc.git/sloc

reposloc

For graphing amount of code over time (as revealed by a git or mercurial repository), a reposloc perl script is provided. This is not installable via the go tool. Consult the man page for usage information.

sloc's People

Contributors

bytbox avatar pushrax avatar

Watchers

Ben Rosenblum 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.