How to read the number of lines of code and the number of lines of code

Source: Internet
Author: User
Tags xquery

How to read the number of lines of code and the number of lines of code

Use CLOC (Count Line of Code)

Prerequisites: 1. preinstalled with perl

2. Download CLOC.

Unzip the installation package to get the

Open the command line, locate the folder of the extracted file, and then tap the command

Perperl YourProject.tar.gz

Output example:

     594 text files.     126 unique files.                                                14 files ignored. v 1.62  T=14.82 s (7.6 files/s, 925.6 lines/s)-------------------------------------------------------------------------------Language                     files          blank        comment           code-------------------------------------------------------------------------------Swift                           67           2780           1119           6843Objective C                      7            265            192           1308JSON                            27              0              0            697HTML                             1             11              0            233C/C++ Header                    10             53             96            125-------------------------------------------------------------------------------SUM:                           112           3109           1407           9206-------------------------------------------------------------------------------

File formats supported by CLOC:

ABAP                       (abap)ActionScript               (as)Ada                        (ada, adb, ads, pad)ADSO/IDSM                  (adso)AMPLE                      (ample, dofile, startup)Ant                        (build.xml)Apex Trigger               (trigger)Arduino Sketch             (ino, pde)ASP                        (asa, asp)ASP.Net                    (asax, ascx, asmx, aspx, config, master, sitemap, webinfo)Assembly                   (asm, S, s)AutoHotkey                 (ahk)awk                        (awk)Bourne Again Shell         (bash)Bourne Shell               (sh)C                          (c, ec, pgc)C Shell                    (csh, tcsh)C#                         (cs)C++                        (C, c++, cc, cpp, cxx, pcc)C/C++ Header               (H, h, hh, hpp)CCS                        (ccs)Clojure                    (clj)ClojureScript              (cljs)CMake                      (cmake, CMakeLists.txt)COBOL                      (CBL, cbl, cob, COB)CoffeeScript               (coffee)ColdFusion                 (cfm)ColdFusion CFScript        (cfc)CSS                        (css)CUDA                       (cu)Cython                     (pyx)D                          (d)DAL                        (da)Dart                       (dart)DOS Batch                  (bat, BAT, btm, BTM, cmd, CMD)DTD                        (dtd)ECPP                       (ecpp)Erlang                     (erl, hrl)Expect                     (exp)F#                         (fs, fsi)Focus                      (focexec)Fortran 77                 (F, f, F77, f77, pfo)Fortran 90                 (F90, f90)Fortran 95                 (F95, f95)Go                         (go)Grails                     (gsp)Groovy                     (gant, groovy)Haml                       (haml)Handlebars                 (handlebars, hbs)Harbour                    (hb)Haskell                    (hs, lhs)HLSL                       (cg, cginc, shader)HTML                       (htm, html)IDL                        (idl, pro)InstallShield              (ism)Java                       (java)Javascript                 (js)JavaServer Faces           (jsf, xhtml)JCL                        (jcl)JSON                       (json)JSP                        (jsp, jspf)Kermit                     (ksc)Korn Shell                 (ksh)Kotlin                     (kt)LESS                       (less)lex                        (l)Lisp                       (el, jl, lisp, lsp, sc)Lisp/OpenCL                (cl)LiveLink OScript           (oscript)Lua                        (lua)m4                         (ac, m4)make                       (am, gnumakefile, Gnumakefile, Makefile, makefile)MATLAB                     (m)Maven                      (pom, pom.xml)Modula3                    (i3, ig, m3, mg)MSBuild script             (csproj, vbproj, vcproj, wdproj, wixproj)MUMPS                      (mps, m)Mustache                   (mustache)MXML                       (mxml)NAnt script                (build)NASTRAN DMAP               (dmap)Objective C                (m)Objective C++              (mm)OCaml                      (ml, mli, mll, mly)Oracle Forms               (fmt)Oracle Reports             (rex)Pascal                     (dpr, p, pas)Pascal/Puppet              (pp)Patran Command Language    (pcl, ses)Perl                       (perl, PL, pl, plh, plx, pm)PHP                        (php, php3, php4, php5)PHP/Pascal                 (inc)Pig Latin                  (pig)PL/I                       (pl1)PowerShell                 (ps1)Python                     (py)QML                        (qml)R                          (R)Racket                     (rkt, rktl, sch, scm, scrbl, ss)Razor                      (cshtml)Rexx                       (rexx)RobotFramework             (tsv)Ruby                       (rake, rb)Ruby HTML                  (rhtml)Rust                       (rs)SASS                       (sass, scss)Scala                      (scala)sed                        (sed)SKILL                      (il)SKILL++                    (ils)Smarty                     (smarty, tpl)Softbridge Basic           (sbl, SBL)SQL                        (psql, sql, SQL)SQL Data                   (data.sql)SQL Stored Procedure       (spc.sql, spoc.sql, sproc.sql, udf.sql)Swift                      (swift)Tcl/Tk                     (itk, tcl, tk)Teamcenter met             (met)Teamcenter mth             (mth)TypeScript                 (ts)Unity-Prefab               (mat, prefab)Vala                       (vala)Vala Header                (vapi)Velocity Template Language (vm)Verilog-SystemVerilog      (sv, svh, v)VHDL                       (vhd, VHD, VHDL, vhdl)vim script                 (vim)Visual Basic               (bas, cls, ctl, dsr, frm, vb, VB, vba, VBA, vbs, VBS)Visualforce Component      (component)Visualforce Page           (page)Windows Message File       (mc)Windows Module Definition  (def)Windows Resource File      (rc, rc2)WiX include                (wxi)WiX source                 (wxs)WiX string localization    (wxl)XAML                       (xaml)xBase                      (prg)xBase Header               (ch)XML                        (XML, xml)XQuery                     (xq, xquery)XSD                        (xsd, XSD)XSLT                       (xsl, XSL, xslt, XSLT)yacc                       (y)YAML                       (yaml, yml)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.