Skip to content

a-hilaly/cs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoCS

Code statistics command line

CircleCI

Feature

languages: C, C++, C#, Go, Javascript, typescript, Bash, Yaml


Install

go get -u github.com/a-hilaly/cs/...

Usage

code statistics

Usage:
  cs [flags]

Flags:
  -h, --help            help for cs
  -g, --is-git          is true will lead program to ignore all files under .git directory (default true)
  -G, --use-gitignore   i .git directory (default true)

examples:

$ cs test/testdata
+----------+-------+-------+------+---------+-------+
| LANGUAGE | FILES | TOTAL | CODE | COMMENT | BLANK |
+----------+-------+-------+------+---------+-------+
| Bash     |     1 |     4 |    1 |       3 |     0 |
| C        |     1 |    49 |   32 |      18 |     8 |
| Cpp      |     1 |    42 |   29 |      13 |    11 |
| Go       |     3 |    27 |   16 |      12 |    10 |
| Yaml     |     1 |     6 |    4 |       3 |     0 |
+----------+-------+-------+------+---------+-------+
|    TOTAL |     7 |   128 |   82 |      49 |    29 |
+----------+-------+-------+------+---------+-------+

Todo

  • Ignore .git directory
  • Use .gitignore elements
  • Add unit tests
  • Add benchmark tests

support langages:

  • ocaml
  • Ruby
  • css
  • html/xml
  • rust
  • python
  • Makefile

About

Code statistics command line

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published