All Projects → hhatto → Gocloc

hhatto / Gocloc

Licence: mit
A little fast cloc(Count Lines Of Code)

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Gocloc

Args
Toolkit for building command line interfaces
Stars: ✭ 399 (-5.45%)
Mutual labels:  cli
Pluradl.py
Automated download of Pluralsight courses
Stars: ✭ 406 (-3.79%)
Mutual labels:  cli
Phpinsights
🔰 Instant PHP quality checks from your console
Stars: ✭ 4,442 (+952.61%)
Mutual labels:  cli
Zlsgo
简单易用、足够轻量、性能好的 Golang 库 - Easy to use, light enough, good performance Golang library
Stars: ✭ 398 (-5.69%)
Mutual labels:  cli
Node Minify
Light Node.js module that compress javascript, css and html files
Stars: ✭ 404 (-4.27%)
Mutual labels:  cli
React Native Version
🔢 Version your React Native or Expo app in a `npm version` fashion.
Stars: ✭ 408 (-3.32%)
Mutual labels:  cli
Cocona
Micro-framework for .NET Core console application. Cocona makes it easy and fast to build console applications on .NET Core.
Stars: ✭ 398 (-5.69%)
Mutual labels:  cli
Cra Universal
🌏 Create React App companion for universal app. No eject, auto SSR, zero config, full HMR, and more (inactive project)
Stars: ✭ 419 (-0.71%)
Mutual labels:  cli
Eva
a calculator REPL, similar to bc(1)
Stars: ✭ 405 (-4.03%)
Mutual labels:  cli
Release It
🚀 Automate versioning and package publishing
Stars: ✭ 4,773 (+1031.04%)
Mutual labels:  cli
Cli
The Aurelia 1 command line tool. Use the CLI to create projects, scaffold components, and bundle your app for release.
Stars: ✭ 401 (-4.98%)
Mutual labels:  cli
Natal
📲 Bootstrap ClojureScript React Native apps
Stars: ✭ 404 (-4.27%)
Mutual labels:  cli
Telegram backup
Java app to download all your telegram data.
Stars: ✭ 409 (-3.08%)
Mutual labels:  cli
Cli
CLI tool for dead-simple serverless Docker deployments on managed Kubernetes services. A self-hosted PaaS. ⚡️
Stars: ✭ 400 (-5.21%)
Mutual labels:  cli
Yaspin
A lightweight terminal spinner for Python with safe pipes and redirects 🎁
Stars: ✭ 413 (-2.13%)
Mutual labels:  cli
Go Prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Stars: ✭ 4,255 (+908.29%)
Mutual labels:  cli
Stonks
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal. See how fast your stonks will crash.
Stars: ✭ 405 (-4.03%)
Mutual labels:  cli
Cli Microsoft365
Manage Microsoft 365 and SharePoint Framework projects on any platform
Stars: ✭ 420 (-0.47%)
Mutual labels:  cli
Mob
Tool for swift git handover.
Stars: ✭ 418 (-0.95%)
Mutual labels:  cli
Globalplatformpro
🌐 🔐 Manage applets and keys on JavaCard-s like a pro (via command line or from your Java project)
Stars: ✭ 409 (-3.08%)
Mutual labels:  cli

gocloc

GoDoc ci Go Report Card Docker Pulls Docker Image Size

A little fast cloc(Count Lines Of Code), written in Go. Inspired by tokei.

Installation

$ go get -u github.com/hhatto/gocloc/cmd/gocloc

Usage

Basic Usage

$ gocloc .
$ gocloc .
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Markdown                         3              8              0             18
Go                               1             29              1            323
-------------------------------------------------------------------------------
TOTAL                            4             37              1            341
-------------------------------------------------------------------------------

Via Docker

with dockerhub

$ docker run --rm -v "${PWD}":/workdir hhatto/gocloc .

with GitHub Packages on GitHub Actions

jobs:
  build:
    name: example of code measurement using gocloc
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/[email protected]

      - name: Login GitHub Registry
        run: docker login docker.pkg.github.com -u owner -p ${{ secrets.GITHUB_TOKEN }}

      - name: Run gocloc
        run: docker run --rm -v "${PWD}":/workdir docker.pkg.github.com/hhatto/gocloc/gocloc:latest .

Integration Jenkins CI

use SLOCCount Plugin.

$ cloc --by-file --output-type=sloccount . > sloccount.scc
$ cat sloccount.scc
398 Go      ./main.go
190 Go      ./language.go
132 Markdown        ./README.md
24  Go      ./xml.go
18  Go      ./file.go
15  Go      ./option.go

Support Languages

use --show-lang option

$ gocloc --show-lang

Performance

cloc

$ time cloc .
    5171 text files.
    5052 unique files.
     420 files ignored.

https://github.com/AlDanial/cloc v 1.66  T=23.31 s (204.0 files/s, 48203.3 lines/s)
-----------------------------------------------------------------------------------
Language                         files          blank        comment           code
-----------------------------------------------------------------------------------
Go                                4197         101140         125939         780280
Assembly                           331           6128          14654          40531
HTML                                41           4927            198          33316
C                                   90           1076            940           7390
Perl                                12            185            177           1135
Bourne Again Shell                  25            209            266            933
XML                                  4             85              9            623
Bourne Shell                         8             71            302            467
Python                               1            121             88            295
DOS Batch                            5             55              1            238
JavaScript                           4             48            122            231
C/C++ Header                        15             50            147            211
CSS                                  3             51              9            176
yacc                                 1             27             20            155
Protocol Buffers                     1              1              0            144
Windows Resource File                4             25              0            116
JSON                                 2              0              0             36
make                                 7             12             10             35
Fortran 90                           2              1              3              8
C++                                  1              3              5              7
awk                                  1              1              6              7
-----------------------------------------------------------------------------------
SUM:                              4755         114216         142896         866334
-----------------------------------------------------------------------------------
cloc .  13.57s user 7.89s system 105% cpu 20.413 total

tokei

$ time tokei --sort code .
-------------------------------------------------------------------------------
 Language            Files        Total       Blanks     Comments         Code
-------------------------------------------------------------------------------
 Go                   4272      1027537       103241       150411       773970
 Plain Text             28            0            0            0       137715
 Assembly              334        61318         6130            0        55188
 HTML                   41        38441         4927          204        33316
 C                      92         9436         1081          946         7409
 BASH                   27         2134          260          570         1304
 XML                     4          717           85            9          623
 Perl                   10         1255          151         1096          343
 Python                  1          504          121           56          327
 Batch                   5          294           55            0          239
 JavaScript              4          401           48          122          231
 C Header               15          408           50          147          211
 CSS                     3          236           51            9          176
 Protocol Buffers        1          145            1            0          144
 Markdown                3            0            0            0          115
 JSON                    2            0            0            0           36
 Makefile                7           57           13           10           34
 FORTRAN Modern          2           12            1            3            8
 C++                     1           15            3            5            7
-------------------------------------------------------------------------------
 Total                4852      1142910       116218       153588      1011396
-------------------------------------------------------------------------------
tokei --sort code .  1.27s user 0.06s system 99% cpu 1.328 total

gocloc

$ time gocloc --exclude-ext=txt .
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Go                            4197         101140         133703         773058
Assembly                       331           6128          14694          40510
HTML                            41           4927            198          33316
C                               90           1076            991           7389
BASH                            28            257            539           1330
Perl                            12            185            177           1135
XML                              4             85              9            623
Python                           1            121             88            295
Batch                            5             55              1            238
JavaScript                       4             48            122            231
C Header                        15             50            147            211
CSS                              3             51              9            176
Yacc                             1             27             20            155
Protocol Buffers                 1              1              0            144
Markdown                         3             29              0             86
Plan9 Shell                      4             25             42             74
Bourne Shell                     5             23             29             70
JSON                             2              0              0             36
make                             7             13             10             34
FORTRAN Modern                   2              1              3              8
Awk                              1              1              6              7
C++                              1              3              5              7
-------------------------------------------------------------------------------
TOTAL                         4758         114246         150793         859133
-------------------------------------------------------------------------------
gocloc --exclude-ext=txt .  0.76s user 0.15s system 116% cpu 0.775 total

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].