{"id":13394713,"url":"https://github.com/AlDanial/cloc","last_synced_at":"2025-03-13T20:31:41.949Z","repository":{"id":37390822,"uuid":"42029482","full_name":"AlDanial/cloc","owner":"AlDanial","description":"cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.","archived":false,"fork":false,"pushed_at":"2024-10-24T03:30:06.000Z","size":5146,"stargazers_count":19550,"open_issues_count":25,"forks_count":1021,"subscribers_count":214,"default_branch":"master","last_synced_at":"2024-10-30T01:39:23.627Z","etag":null,"topics":["cloc","count-lines","programming-language"],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlDanial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["AlDanial"]}},"created_at":"2015-09-07T03:30:43.000Z","updated_at":"2024-10-29T23:04:11.000Z","dependencies_parsed_at":"2023-10-01T18:06:58.626Z","dependency_job_id":"45b4157f-ecdc-4dd7-aaa9-46275639b389","html_url":"https://github.com/AlDanial/cloc","commit_stats":{"total_commits":934,"total_committers":124,"mean_commits":7.532258064516129,"dds":"0.24411134903640253","last_synced_commit":"64005f39906357bc896a4ceef8cdea293e23ad82"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlDanial%2Fcloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlDanial%2Fcloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlDanial%2Fcloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlDanial%2Fcloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlDanial","download_url":"https://codeload.github.com/AlDanial/cloc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242945835,"owners_count":20210763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloc","count-lines","programming-language"],"created_at":"2024-07-30T17:01:29.102Z","updated_at":"2025-03-13T20:31:41.934Z","avatar_url":"https://github.com/AlDanial.png","language":"Perl","funding_links":["https://github.com/sponsors/AlDanial"],"categories":["Perl","Misc","Development","Other Tools","Command Line Utilities","Containers \u0026 Language Extentions \u0026 Linting","Measuring","others","其他","For Developers","[Software / Web Service](#contents)","\u003ca name=\"programming\"\u003e\u003c/a\u003eProgramming","Audit Scoping","Code","Applications"],"sub_categories":["Time Series","Bonus","Tools","For JavaScript","网络服务_其他","Directory Navigation","Others","Development","Cloc","System tools"],"readme":"\u003ca name=\"___top\"\u003e\u003c/a\u003e\n# cloc\n*Count Lines of Code*\n\n* * *\ncloc counts blank lines, comment lines, and physical lines of source code in many programming languages.\n\nLatest release:  v2.04 (Jan. 31, 2025)\n\n[![Version](https://img.shields.io/badge/version-2.04-blue.svg)](https://github.com/AlDanial/cloc)\n[![Contributors](https://img.shields.io/github/contributors/AlDanial/cloc.svg)](https://github.com/AlDanial/cloc/graphs/contributors)\n[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.42029482.svg)](https://doi.org/10.5281/zenodo.42029482)\n[![Forks](https://img.shields.io/github/forks/AlDanial/cloc.svg)](https://github.com/AlDanial/cloc/network/members)\n[![Downloads](https://img.shields.io/github/downloads/AlDanial/cloc/total.svg)]()\n\ncloc moved to GitHub in September 2015 after being hosted\nat http://cloc.sourceforge.net/ since August 2006.\n\n*   [Quick Start](#quick-start-)\n*   [Overview](#overview-)\n*   [Download](https://github.com/AlDanial/cloc/releases/latest)\n    *   [Install via package manager](#install-via-package-manager)\n    *   [Stable release](#stable-release)\n    *   [Development version](#development-version)\n*   [License](#license-)\n*   [Why Use cloc?](#why-use-cloc-)\n*   [Other Counters](#other-counters-)\n*   [Building a Windows Executable](#building-a-windows-executable-)\n*   [Basic Use](#basic-use-)\n*   [Options](#options-)\n*   [Recognized Languages](#recognized-languages-)\n*   [How it Works](#how-it-works-)\n*   [Advanced Use](#advanced-use-)\n    *   [Remove Comments from Source Code](#remove-comments-from-source-code-)\n    *   [Work with Compressed Archives](#work-with-compressed-archives-)\n    *   [Differences](#differences-)\n    *   [Create Custom Language Definitions](#create-custom-language-definitions-)\n    *   [Combine Reports](#combine-reports-)\n    *   [SQL](#sql-)\n    *   [Custom Column Output](#custom-column-output-)\n    *   [Wrapping cloc in other scripts](#wrapping-cloc-in-other-scripts-)\n    *   [git and UTF8 pathnames](#git-and-UTF8-pathnames-)\n    *   [Third Generation Language Scale Factors](#third-generation-language-scale-factors-)\n    *   [options.txt configuration file](#optionstxt-configuration-file-)\n    *   [Java Programmatic Interface](#java-programmatic-interface-)\n*   [Complex regular subexpression recursion limit ](#complex-regular-subexpression-recursion-limit-)\n*   [Limitations](#limitations-)\n*   [Requesting Support for Additional Languages](#requesting-support-for-additional-languages-)\n*   [Reporting Problems](#reporting-problems-)\n*   [Citation](#citation-)\n*   [Acknowledgments](#acknowledgments-)\n*   [Copyright](#copyright-)\n\n\u003ca name=\"Quick_Start\"\u003e\u003c/a\u003e      []({{{1)\n# [Quick Start \u0026#9650;](#___top \"click to go to top of document\")\n\nStep 1:  Download cloc (several methods, see below) or run cloc's\n[docker image](#run-via-docker).  The Windows executable has no requirements.\nThe source version of cloc requires a Perl interpreter, and the\nDocker version of cloc requires a Docker installation.\n\nStep 2:  Open a terminal (`cmd.exe` on Windows).\n\nStep 3:  Invoke cloc to count your source files, directories, archives,\nor git commits.\nThe executable name differs depending on whether you use the\ndevelopment source version (`cloc`), source for a\nreleased version (`cloc-2.04.pl`) or a Windows executable\n(`cloc-2.04.exe`).\n\nOn this page, `cloc` is the generic term\nused to refer to any of these.\n\n[Include Security](https://www.youtube.com/user/IncludeSecurity) has a\n[YouTube video](https://www.youtube.com/watch?v=eRLTkDMsCqs)\nshowing the steps in action.\n\n**a file**\n\u003cpre\u003e\nprompt\u003e cloc hello.c\n       1 text file.\n       1 unique file.\n       0 files ignored.\n\nhttps://github.com/AlDanial/cloc v 1.65  T=0.04 s (28.3 files/s, 340.0 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nC                                1              0              7              5\n-------------------------------------------------------------------------------\n\u003c/pre\u003e\n\n**a directory**\n\u003cpre\u003e\nprompt\u003e cloc gcc-5.2.0/gcc/c\n      16 text files.\n      15 unique files.\n       3 files ignored.\n\nhttps://github.com/AlDanial/cloc v 1.65  T=0.23 s (57.1 files/s, 188914.0 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nC                               10           4680           6621          30812\nC/C++ Header                     3             99            286            496\n-------------------------------------------------------------------------------\nSUM:                            13           4779           6907          31308\n-------------------------------------------------------------------------------\n\u003c/pre\u003e\n\n**an archive**\n\nWe'll pull cloc's source zip file from GitHub, then count the contents:\n\u003cpre\u003e\nprompt\u003e wget https://github.com/AlDanial/cloc/archive/master.zip\n\nprompt\u003e cloc master.zip\nhttps://github.com/AlDanial/cloc v 1.65  T=0.07 s (26.8 files/s, 141370.3 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nPerl                             2            725           1103           8713\n-------------------------------------------------------------------------------\nSUM:                             2            725           1103           8713\n-------------------------------------------------------------------------------\n\u003c/pre\u003e\n\n**a git repository, using a specific commit**\n\nThis example uses code from\n\u003ca href=https://pypi.python.org/pypi/pudb\u003ePuDB\u003c/a\u003e, a fantastic Python debugger.\n\n\u003cpre\u003e\nprompt\u003e git clone https://github.com/inducer/pudb.git\n\nprompt\u003e cd pudb\n\nprompt\u003e cloc 6be804e07a5db\n      48 text files.\n      41 unique files.                              \n       8 files ignored.\n\ngithub.com/AlDanial/cloc v 1.99  T=0.04 s (1054.9 files/s, 189646.8 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nPython                          28           1519            728           4659\nreStructuredText                 6            102             20            203\nYAML                             2              9              2             75\nBourne Shell                     3              6              0             17\nText                             1              0              0             11\nmake                             1              4              6             10\n-------------------------------------------------------------------------------\nSUM:                            41           1640            756           4975\n-------------------------------------------------------------------------------\n\u003c/pre\u003e\n\n**each subdirectory of a particular directory**\n\nSay you have a directory with three different git-managed projects,\nProject0, Project1, and Project2.  You can use your shell's looping\ncapability to count the code in each.  This example uses bash (scroll down for cmd.exe example):\n\u003cpre\u003e\nprompt\u003e for d in ./*/ ; do (cd \"$d\" \u0026\u0026 echo \"$d\" \u0026\u0026 cloc --vcs git); done\n./Project0/\n7 text files.\n       7 unique files.\n       1 file ignored.\n\ngithub.com/AlDanial/cloc v 1.71  T=0.02 s (390.2 files/s, 25687.6 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nD                                4             61             32            251\nMarkdown                         1              9              0             38\nmake                             1              0              0              4\n-------------------------------------------------------------------------------\nSUM:                             6             70             32            293\n-------------------------------------------------------------------------------\n./Project1/\n       7 text files.\n       7 unique files.\n       0 files ignored.\n\ngithub.com/AlDanial/cloc v 1.71  T=0.02 s (293.0 files/s, 52107.1 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nGo                               7            165            282            798\n-------------------------------------------------------------------------------\nSUM:                             7            165            282            798\n-------------------------------------------------------------------------------\n./Project2/\n      49 text files.\n      47 unique files.\n      13 files ignored.\n\ngithub.com/AlDanial/cloc v 1.71  T=0.10 s (399.5 files/s, 70409.4 lines/s)\n-------------------------------------------------------------------------------\nLanguage                     files          blank        comment           code\n-------------------------------------------------------------------------------\nPython                          33           1226           1026           3017\nC                                4            327            337            888\nMarkdown                         1             11              0             28\nYAML                             1              0              2             12\n-------------------------------------------------------------------------------\nSUM:                            39           1564           1365           3945\n-------------------------------------------------------------------------------\n\u003c/pre\u003e\n\n**each subdirectory of a particular directory (Windows/cmd.exe)**\n\u003cpre\u003e\nfor /D %I in (.\\*) do cd %I \u0026\u0026 cloc --vcs git \u0026\u0026 cd ..\n\u003c/pre\u003e\n\n[](1}}})\n\u003ca name=\"Overview\"\u003e\u003c/a\u003e      []({{{1)\n# [Overview \u0026#9650;](#___top \"click to go to top of document\")\n\ncloc counts blank lines, comment lines, and physical lines of source\ncode in [many programming languages](#Languages). Given two versions of\na code base, cloc can compute differences in blank, comment, and source\nlines. It is written entirely in Perl with no dependencies outside the\nstandard distribution of Perl v5.6 and higher (code from some external\nmodules is [embedded within\ncloc](https://github.com/AlDanial/cloc#regexp_common)) and so is\nquite portable. cloc is known to run on many flavors of Linux, FreeBSD,\nNetBSD, OpenBSD, macOS, AIX, HP-UX, Solaris, IRIX, z/OS, and Windows.\n(To run the Perl source version of cloc on Windows one needs\n[ActiveState Perl](http://www.activestate.com/activeperl) 5.6.1 or\nhigher, [Strawberry Perl](http://strawberryperl.com/),\nWindows Subsystem for Linux,\n[Cygwin](http://www.cygwin.com/),\n[MobaXTerm](http://mobaxterm.mobatek.net/) with the Perl plug-in\ninstalled,\nor\na mingw environment and terminal such as provided by\n[Git for Windows](https://gitforwindows.org/).\nAlternatively one can use the Windows binary of cloc\ngenerated with [PAR::Packer](http://search.cpan.org/~rschupp/PAR-Packer-1.019/lib/pp.pm)\nto run on Windows computers that have neither Perl nor Cygwin.)\n\nIn addition to counting code in individual text files, directories,\nand git repositories, cloc can also count code in archive files such\nas ``.tar`` (including compressed versions), ``.zip``, Python\nwheel ``.whl``, Jupyter notebook ``.ipynb``, source RPMs ``.rpm``\nor ``.src`` (requires ``rpm2cpio``),\nand Debian ``.deb`` files (requires ``dpkg-deb``).\n\ncloc contains code from David Wheeler's\n[SLOCCount](http://www.dwheeler.com/sloccount/),\nDamian Conway and Abigail's Perl module\n[Regexp::Common](http://search.cpan.org/%7Eabigail/Regexp-Common-2.120/lib/Regexp/Common.pm),\nSean M. Burke's Perl module\n[Win32::Autoglob](http://search.cpan.org/%7Esburke/Win32-Autoglob-1.01/Autoglob.pm),\nand Tye McQueen's Perl module\n[Algorithm::Diff](http://search.cpan.org/%7Etyemq/Algorithm-Diff-1.1902/lib/Algorithm/Diff.pm).\nLanguage scale factors were derived from Mayes Consulting, LLC web site\nhttp://softwareestimator.com/IndustryData2.htm.\n\nNew releases nominally appear every six months.\n[](1}}})\n\n\u003ca name=\"Docker\"\u003e\u003c/a\u003e []({{{1)\n## Run via docker\n\nThese docker commands count lines of code in and below\nthe current directory:\n\n```shell\ndocker run --rm -v $PWD:/tmp aldanial/cloc .\n```\n\n### Run via docker on git-bash\n```shell\ndocker run --rm -v \"/$(pwd -W)\":/tmp aldanial/cloc .\n```\n\n## Install via package manager\nDepending your operating system, one of these installation methods may\nwork for you (all but the last two entries for Windows require\na Perl interpreter):\n\n    npm install -g cloc              # https://www.npmjs.com/package/cloc\n    sudo apt install cloc            # Debian, Ubuntu\n    sudo yum install cloc            # Red Hat, Fedora\n    sudo dnf install cloc            # Fedora 22 or later\n    sudo pacman -S cloc              # Arch\n    yay -S cloc-git                  # Arch AUR (latest git version)\n    sudo emerge -av dev-util/cloc    # Gentoo https://packages.gentoo.org/packages/dev-util/cloc\n    sudo apk add cloc                # Alpine Linux\n    doas pkg_add cloc                # OpenBSD\n    sudo pkg install cloc            # FreeBSD\n    sudo port install cloc           # macOS with MacPorts\n    brew install cloc                # macOS with Homebrew\n    winget install AlDanial.Cloc     # Windows with winget (might not work, ref https://github.com/AlDanial/cloc/issues/849)\n    choco install cloc               # Windows with Chocolatey\n    scoop install cloc               # Windows with Scoop\n\n**Note**: I don't control any of these packages.\nIf you encounter a bug in cloc using one of the above\npackages, try with cloc pulled from the latest stable release here\non GitHub (link follows below) before submitting a problem report.\n[](1}}})\n\u003ca name=\"Stable\"\u003e\u003c/a\u003e []({{{1)\n## Stable release\n\nDownload the latest released cloc source file, for example `cloc-2.04.pl`, or\nthe Windows executable `cloc-2.04.exe` from\nhttps://github.com/AlDanial/cloc/releases/latest\n\n\u003ca name=\"Dev\"\u003e\u003c/a\u003e\n## Development version\n\nDownload the cloc source code at https://github.com/AlDanial/cloc/raw/master/cloc and\nsave it as the file `cloc` (or `cloc.pl`, or whatever executable name you wish).\nThe next step depends on the operating system you're using.\n\n### On Unix-like systems, including macOS\n\nIn a terminal, go to the download directory\nand make the cloc file executable, then give it a test run.\nFor example\n\n```shell\n» cd ~/Downloads\n» chmod +x cloc\n» ./cloc --version\n```\n\nFor future use, move the file to a more convenient directory in your `PATH`\nsuch as `/usr/local/bin` or `~/bin`.\n\n### On Windows\n\nYou'll need a Perl interpreter such as [Strawberry Perl](http://strawberryperl.com/)\ninstalled to run the source version of cloc.\nAfter downloading the cloc source file, open a command prompt or PowerShell window,\nnavigate to the download directory (`C:\\TEMP` in the example below), then test cloc with:\n\n```dos\ncd C:\\TEMP\u003e\nC:TEMP\\\u003e perl cloc --version\n```\n\n[](1}}})\n\u003ca name=\"License\"\u003e\u003c/a\u003e []({{{1)\n# [License \u0026#9650;](#___top \"click to go to top of document\")\n\ncloc is licensed under the\n[GNU General Public License, v 2](http://www.gnu.org/licenses/gpl-2.0.html),\nexcluding portions which\nare copied from other sources. Code\ncopied from the Regexp::Common, Win32::Autoglob, and Algorithm::Diff\nPerl modules is subject to the\n[Artistic License](https://opensource.org/license/artistic-2-0).\n[](1}}})\n\u003ca name=\"why_use\"\u003e\u003c/a\u003e []({{{1)\n# [Why Use cloc? \u0026#9650;](#___top \"click to go to top of document\")\n\ncloc has many features that make it easy to use, thorough, extensible, and portable:\n\n1.  Exists as a single, self-contained file that requires minimal installation effort---just download the file and run it.\n2.  Can read language comment definitions from a file and thus potentially work with computer languages that do not yet exist.\n3.  Allows results from multiple runs to be summed together by language and by project.\n4.  Can produce results in a variety of formats: plain text, Markdown, SQL, JSON, XML, YAML, comma separated values.\n5.  Can count code within compressed archives (tar balls, Zip files, Java .ear files).\n6.  Has numerous troubleshooting options.\n7.  Handles file and directory names with spaces and other unusual characters.\n8.  Has no dependencies outside the standard Perl distribution.\n9.  Runs on Linux, FreeBSD, NetBSD, OpenBSD, macOS, AIX, HP-UX, Solaris, IRIX, and z/OS systems that have Perl 5.6 or higher. The source version runs on Windows with either ActiveState Perl, Strawberry Perl, Cygwin, or MobaXTerm+Perl plugin. Alternatively on Windows one can run the Windows binary which has no dependencies.\n[](1}}})\n\n\u003ca name=\"Other_Counters\"\u003e\u003c/a\u003e []({{{1)\n# [Other Counters \u0026#9650;](#___top \"click to go to top of document\")\n\nIf cloc does not suit your needs here are other freely available counters to consider:\n\n*   [loc](https://github.com/cgag/loc/)\n*   [gcloc](https://github.com/JoaoDanielRufino/gcloc)\n*   [gocloc](https://github.com/hhatto/gocloc/)\n*   [Ohcount](https://github.com/blackducksoftware/ohcount/)\n*   [scc](https://github.com/boyter/scc/)\n*   [sclc](https://code.google.com/archive/p/sclc/)\n*   [SLOCCount](http://www.dwheeler.com/sloccount/)\n*   [Sonar](http://www.sonarsource.org/)\n*   [tokei](https://github.com/Aaronepower/tokei/)\n*   [Unified Code Count](http://csse.usc.edu/ucc_new/wordpress/)\n\nOther references:\n\n*   QSM's [directory](http://www.qsm.com/CodeCounters.html) of code counting tools.\n*   The [Wikipedia entry](http://en.wikipedia.org/wiki/Source_lines_of_code) for source code line counts.\n[](1}}})\n\n# \u003ca name=\"regexp_common\"\u003eRegexp::Common, Digest::MD5, Win32::Autoglob, Algorithm::Diff\u003c/a\u003e []({{{1)\n\nAlthough cloc does not need Perl modules outside those found in the\nstandard distribution, cloc does rely on a few external modules. Code\nfrom three of these external modules--Regexp::Common, Win32::Autoglob,\nand Algorithm::Diff--is embedded within cloc. A fourth module,\nDigest::MD5, is used only if it is available. If cloc finds\nRegexp::Common or Algorithm::Diff installed locally it will use those\ninstallation. If it doesn't, cloc will install the parts of\nRegexp::Common and/or Algorithm:Diff it needs to temporary directories\nthat are created at the start of a cloc run then removed when the run is\ncomplete. The necessary code from Regexp::Common v2.120 and\nAlgorithm::Diff v1.1902 are embedded within the cloc source code (see\nsubroutines `Install_Regexp_Common()` and `Install_Algorithm_Diff()` ).\nOnly three lines are needed from Win32::Autoglob and these are included\ndirectly in cloc.\n\nAdditionally, cloc will use Digest::MD5 to validate uniqueness among\nequally-sized input files if Digest::MD5 is installed locally.\n\nA parallel processing option, \u003ctt\u003e--processes=\u003ci\u003eN\u003c/i\u003e\u003c/tt\u003e, was introduced with\ncloc version 1.76 to enable faster runs on multi-core machines.  However,\nto use it, one must have the module Parallel::ForkManager installed.\nThis module does not work reliably on Windows so parallel processing\nwill only work on Unix-like operating systems.\n\nThe Windows binary is built on a computer that has both Regexp::Common\nand Digest::MD5 installed locally.\n[](1}}})\n\u003ca name=\"building_exe\"\u003e\u003c/a\u003e []({{{1)\n# [Building a Windows Executable \u0026#9650;](#___top \"click to go to top of document\")\n\n#### Create your own executable\nThe most robust option for creating a Windows executable of\ncloc is to use [ActiveState's Perl Development Kit](http://www.activestate.com/perl-dev-kit).\nIt includes a utility, `perlapp`, which can build stand-alone\nWindows, Mac, and Linux binaries of Perl source code.\n\n[perl2exe](http://www.indigostar.com/perl2exe/)\nwill also do the trick.  If you do have `perl2exe`, modify lines\n84-87 in the cloc source code for a minor code\nmodification that is necessary to make a cloc Windows executable.\n\nOtherwise, to build a Windows executable with `pp` from\n`PAR::Packer`, first install a Windows-based Perl distribution\n(for example Strawberry Perl or ActivePerl) following their\ninstructions. Next, open a command prompt, aka a DOS window and install\nthe PAR::Packer module. Finally, invoke the newly installed `pp`\ncommand with the cloc source code to create an `.exe` file:\n\n\u003cpre\u003e\nC:\u003e cpan -i Digest::MD5\nC:\u003e cpan -i Regexp::Common\nC:\u003e cpan -i Algorithm::Diff\nC:\u003e cpan -i PAR::Packer\nC:\u003e cpan -i Win32::LongPath\nC:\u003e pp -M Win32::LongPath -M Encode::Unicode -M Digest::MD5 -c -x -o cloc-2.04.exe cloc-2.04.pl\n\u003c/pre\u003e\n\nA variation on the instructions above is if you installed the portable\nversion of Strawberry Perl, you will need to run `portableshell.bat` first\nto properly set up your environment.\n\nThe Windows executable in the Releases section, \u003ctt\u003ecloc-2.04.exe\u003c/tt\u003e,\nwas built on a 64 bit Windows 10 computer using\n[Strawberry Perl](http://strawberryperl.com/)\n5.30.2 and\n[PAR::Packer](http://search.cpan.org/~rschupp/PAR-Packer-1.050/lib/pp.pm)\nto build the `.exe`.\n\n#### Is the Windows executable safe to run?  Does it have malware?\n\nIdeally, no one would need the Windows executable because they\nhave a Perl interpreter installed on their machines and can\nrun the cloc source file.\nOn centrally-managed corporate Windows machines, however, this\nthis may be difficult or impossible.\n\nThe Windows executable distributed with cloc is provided as\na best-effort of a virus and malware-free `.exe`.\nYou are encouraged to run your own virus scanners against the\nexecutable and also check sites such\nhttps://www.virustotal.com/ .\nThe entries for recent versions are:\n\ncloc-2.04.exe:\nhttps://www.virustotal.com/gui/file/89cda0038bf4e13c6c13ebc1e60bec4dfad362e69ac8a5b8e2d5ebe3020359e1\n\ncloc-2.02-winget.exe:  (includes [PR 850](https://github.com/AlDanial/cloc/pull/850) to allow\n[running from a symlink on Windows](https://github.com/AlDanial/cloc/issues/849))\nhttps://www.virustotal.com/gui/file/be033061e091fea48a5bc9e8964cee0416ddd5b34bd5226a1c9aa4b30bdba66a?nocache=1\n\ncloc-2.02.exe:\nhttps://www.virustotal.com/gui/file/369ed76125f7399cd582d169adf39a2e08ae5066031fea0cc8b2836ea50e7ce2?nocache=1\n\ncloc-2.00.exe:\nhttps://www.virustotal.com/gui/file/7a234ef0cb495de1b5776acf88c5554e2bab1fb02725a5fb85756a6db3121c1f\n\ncloc-1.98.exe:\nhttps://www.virustotal.com/gui/file/88615d193ec8c06f7ceec3cc1d661088af997798d87ddff331d9e9f9128a6782?nocache=1\n\ncloc-1.96.1.exe:\nhttps://www.virustotal.com/gui/file/00b1c9dbbfb920dabd374418e1b86d2c24b8cd2b8705aeb956dee910d0d75d45?nocache=1\n\ncloc-1.96.exe:\nhttps://www.virustotal.com/gui/file/54bf5f46fbaba7949c4eb2d4837b03c774c0ba587448a5bad9b8efc0222b1583?nocache=1\n\ncloc-1.94.exe:\nhttps://www.virustotal.com/gui/file/b48a6002fb75fa66ec5d0c05a5c4d51f2ad22b5b025b7eb4e3945d18419c0952?nocache=1\n\ncloc-1.92.exe:\nhttps://www.virustotal.com/gui/file/2668fcf8609c431e8934fe9e1866bc620c58d198c4eb262f1d3ef31ef4a690f7\n\ncloc-1.90.exe:\nhttps://www.virustotal.com/gui/file/d655caae55486f9bac39f7e3c7b7553bcfcfe2b88914c79bfc328055f22b8a37/detection\n\ncloc-1.88.exe:\nhttps://www.virustotal.com/gui/file/97d5d2631d1cccdbfd99267ab8a4cf5968816bbe52c0f9324e72e768857f642d/detection\n\ncloc-1.86.exe:\nhttps://www.virustotal.com/gui/file/1b2e189df1834411b34534db446330d1c379b4bc008af3042ee9ade818c6a1c8/detection\n\ncloc-1.84.exe:\nhttps://www.virustotal.com/gui/file/e73d490c1e4ae2f50ee174005614029b4fa2610dcb76988714839d7be68479af/detection\n\ncloc-1.82.exe:\nhttps://www.virustotal.com/#/file/2e5fb443fdefd776d7b6b136a25e5ee2048991e735042897dbd0bf92efb16563/detection\n\ncloc-1.80.exe:\nhttps://www.virustotal.com/#/file/9e547b01c946aa818ffad43b9ebaf05d3da08ed6ca876ef2b6847be3bf1cf8be/detection\n\ncloc-1.78.exe:\nhttps://www.virustotal.com/#/file/256ade3df82fa92febf2553853ed1106d96c604794606e86efd00d55664dd44f/detection\n\ncloc-1.76.exe:\nhttps://www.virustotal.com/#/url/c1b9b9fe909f91429f95d41e9a9928ab7c58b21351b3acd4249def2a61acd39d/detection\n\ncloc-1.74_x86.exe:\nhttps://www.virustotal.com/#/file/b73dece71f6d3199d90d55db53a588e1393c8dbf84231a7e1be2ce3c5a0ec75b/detection\n\ncloc 1.72 exe:\nhttps://www.virustotal.com/en/url/8fd2af5cd972f648d7a2d7917bc202492012484c3a6f0b48c8fd60a8d395c98c/analysis/\n\ncloc 1.70 exe:\nhttps://www.virustotal.com/en/url/63edef209099a93aa0be1a220dc7c4c7ed045064d801e6d5daa84ee624fc0b4a/analysis/\n\ncloc 1.68 exe:\nhttps://www.virustotal.com/en/file/c484fc58615fc3b0d5569b9063ec1532980281c3155e4a19099b11ef1c24443b/analysis/\n\ncloc 1.66 exe:\nhttps://www.virustotal.com/en/file/54d6662e59b04be793dd10fa5e5edf7747cf0c0cc32f71eb67a3cf8e7a171d81/analysis/1453601367/\n\n#### Why is the Windows executable so large?\n\nWindows executables of cloc versions 1.60 and earlier, created with\nperl2exe as noted above, are about 1.6 MB, while versions 1.62 and 1.54, created\nwith `PAR::Packer`, are 11 MB.\nVersion 1.66, built with a newer version of `PAR::Packer`, is about 5.5 MB.\nWhy are the `PAR::Packer`, executables so\nmuch larger than those built with perl2exe? My theory is that perl2exe\nuses smarter tree pruning logic\nthan `PAR::Packer`, but that's pure speculation.\n\n[](1}}})\n\u003ca name=\"Basic_Use\"\u003e\u003c/a\u003e []({{{1)\n# [Basic Use \u0026#9650;](#___top \"click to go to top of document\")\n\ncloc is a command line program that takes file, directory, and/or\narchive names as inputs. Here's an example of running cloc against the\nPerl v5.22.0 source distribution:\n\n\u003cpre\u003e\nprompt\u003e cloc perl-5.22.0.tar.gz\n    5605 text files.\n    5386 unique files.\n    2176 files ignored.\n\nhttps://github.com/AlDanial/cloc v 1.65  T=25.49 s (134.7 files/s, 51980.3 lines/s)\n-----------------------------------------------------------------------------------\nLanguage                         files          blank        comment           code\n-----------------------------------------------------------------------------------\nPerl                              2892         136396         184362         536445\nC                                  130          24676          33684         155648\nC/C++ Header                       148           9766          16569         147858\nBourne Shell                       112           4044           6796          42668\nPascal                               8            458           1603           8592\nXML                                 33            142              0           2410\nYAML                                49             20             15           2078\nC++                                 10            313            277           2033\nmake                                 4            426            488           1986\nProlog                              12            438              2           1146\nJSON                                14              1              0           1037\nyacc                                 1             85             76            998\nWindows Message File                 1            102             11            489\nDOS Batch                           14             92             41            389\nWindows Resource File                3             10              0             85\nD                                    1              5              7              8\nLisp                                 2              0              3              4\n-----------------------------------------------------------------------------------\nSUM:                              3434         176974         243934         903874\n-----------------------------------------------------------------------------------\n\n\u003c/pre\u003e\n\nTo run cloc on Windows computers, open up a command (aka DOS) window\nand invoke cloc.exe from the command line there.\nAlternatively, try ClocViewer, the GUI wrapper around cloc found at\nhttps://github.com/Roemer/ClocViewer.\n\nSee also https://github.com/jmensch1/codeflower for a\ngraphical rendering of cloc results.\n[](1}}})\n\u003ca name=\"Options\"\u003e\u003c/a\u003e []({{{1)\n# [Options \u0026#9650;](#___top \"click to go to top of document\")\n\n\u003cpre\u003e\nprompt\u003e cloc --help\n\nUsage: cloc [options] \u0026lt;file(s)/dir(s)/git hash(es)\u0026gt; | \u0026lt;set 1\u0026gt; \u0026lt;set 2\u0026gt; | \u0026lt;report files\u0026gt;\n\n Count, or compute differences of, physical lines of source code in the\n given files (may be archives such as compressed tarballs or zip files,\n or git commit hashes or branch names) and/or recursively below the\n given directories.\n\n Input Options\n   --extract-with=\u0026lt;cmd\u0026gt;      This option is only needed if cloc is unable\n                             to figure out how to extract the contents of\n                             the input file(s) by itself.\n                             Use \u0026lt;cmd\u0026gt; to extract binary archive files (e.g.:\n                             .tar.gz, .zip, .Z).  Use the literal '\u0026gt;FILE\u0026lt;' as\n                             a stand-in for the actual file(s) to be\n                             extracted.  For example, to count lines of code\n                             in the input files\n                                gcc-4.2.tar.gz  perl-5.8.8.tar.gz\n                             on Unix use\n                               --extract-with='gzip -dc \u0026gt;FILE\u0026lt; | tar xf -'\n                             or, if you have GNU tar,\n                               --extract-with='tar zxf \u0026gt;FILE\u0026lt;'\n                             and on Windows use, for example:\n                               --extract-with=\"\\\"c:\\Program Files\\WinZip\\WinZip32.exe\\\" -e -o \u0026gt;FILE\u0026lt; .\"\n                             (if WinZip is installed there).\n   --list-file=\u0026lt;file\u0026gt;        Take the list of file and/or directory names to\n                             process from \u0026lt;file\u0026gt;, which has one file/directory\n                             name per line.  Only exact matches are counted;\n                             relative path names will be resolved starting from\n                             the directory where cloc is invoked.  Set \u0026lt;file\u0026gt;\n                             to - to read file names from a STDIN pipe.\n                             See also --exclude-list-file.\n   --diff-list-file=\u0026lt;file\u0026gt;   Take the pairs of file names to be diff'ed from\n                             \u0026lt;file\u0026gt;, whose format matches the output of\n                             --diff-alignment.  (Run with that option to\n                             see a sample.)  The language identifier at the\n                             end of each line is ignored.  This enables --diff\n                             mode and bypasses file pair alignment logic.\n   --vcs=\u0026lt;VCS\u0026gt;               Invoke a system call to \u0026lt;VCS\u0026gt; to obtain a list of\n                             files to work on.  If \u0026lt;VCS\u0026gt; is 'git', then will\n                             invoke 'git ls-files' to get a file list and\n                             'git submodule status' to get a list of submodules\n                             whose contents will be ignored.  See also --git\n                             which accepts git commit hashes and branch names.\n                             If \u0026lt;VCS\u0026gt; is 'svn' then will invoke 'svn list -R'.\n                             The primary benefit is that cloc will then skip\n                             files explicitly excluded by the versioning tool\n                             in question, ie, those in .gitignore or have the\n                             svn:ignore property.\n                             Alternatively \u0026lt;VCS\u0026gt; may be any system command\n                             that generates a list of files.\n                             Note:  cloc must be in a directory which can read\n                             the files as they are returned by \u0026lt;VCS\u0026gt;.  cloc will\n                             not download files from remote repositories.\n                             'svn list -R' may refer to a remote repository\n                             to obtain file names (and therefore may require\n                             authentication to the remote repository), but\n                             the files themselves must be local.\n                             Setting \u0026lt;VCS\u0026gt; to 'auto' selects between 'git'\n                             and 'svn' (or neither) depending on the presence\n                             of a .git or .svn subdirectory below the directory\n                             where cloc is invoked.\n   --unicode                 Check binary files to see if they contain Unicode\n                             expanded ASCII text.  This causes performance to\n                             drop noticeably.\n\n Processing Options\n   --autoconf                Count .in files (as processed by GNU autoconf) of\n                             recognized languages.  See also --no-autogen.\n   --by-file                 Report results for every source file encountered.\n   --by-file-by-lang         Report results for every source file encountered\n                             in addition to reporting by language.\n   --config \u0026lt;file\u0026gt;           Read command line switches from \u0026lt;file\u0026gt; instead of\n                             the default location of /home/al/.config/cloc/options.txt.\n                             The file should contain one switch, along with\n                             arguments (if any), per line.  Blank lines and lines\n                             beginning with '#' are skipped.  Options given on\n                             the command line take priority over entries read from\n                             the file.\n   --count-and-diff \u0026lt;set1\u0026gt; \u0026lt;set2\u0026gt;\n                             First perform direct code counts of source file(s)\n                             of \u0026lt;set1\u0026gt; and \u0026lt;set2\u0026gt; separately, then perform a diff\n                             of these.  Inputs may be pairs of files, directories,\n                             or archives.  If --out or --report-file is given,\n                             three output files will be created, one for each\n                             of the two counts and one for the diff.  See also\n                             --diff, --diff-alignment, --diff-timeout,\n                             --ignore-case, --ignore-whitespace.\n   --diff \u0026lt;set1\u0026gt; \u0026lt;set2\u0026gt;      Compute differences in code and comments between\n                             source file(s) of \u0026lt;set1\u0026gt; and \u0026lt;set2\u0026gt;.  The inputs\n                             may be any mix of files, directories, archives,\n                             or git commit hashes.  Use --diff-alignment to\n                             generate a list showing which file pairs where\n                             compared.  When comparing git branches, only files\n                             which have changed in either commit are compared.\n                             See also --git, --count-and-diff, --diff-alignment,\n                             --diff-list-file, --diff-timeout, --ignore-case,\n                             --ignore-whitespace.\n   --diff-timeout \u0026lt;N\u0026gt;        Ignore files which take more than \u0026lt;N\u0026gt; seconds\n                             to process.  Default is 10 seconds.  Setting \u0026lt;N\u0026gt;\n                             to 0 allows unlimited time.  (Large files with many\n                             repeated lines can cause Algorithm::Diff::sdiff()\n                             to take hours.) See also --timeout.\n   --docstring-as-code       cloc considers docstrings to be comments, but this is\n                             not always correct as docstrings represent regular\n                             strings when they appear on the right hand side of an\n                             assignment or as function arguments.  This switch\n                             forces docstrings to be counted as code.\n   --follow-links            [Unix only] Follow symbolic links to directories\n                             (sym links to files are always followed).\n                             See also --stat.\n   --force-lang=\u0026lt;lang\u0026gt;[,\u0026lt;ext\u0026gt;]\n                             Process all files that have a \u0026lt;ext\u0026gt; extension\n                             with the counter for language \u0026lt;lang\u0026gt;.  For\n                             example, to count all .f files with the\n                             Fortran 90 counter (which expects files to\n                             end with .f90) instead of the default Fortran 77\n                             counter, use\n                               --force-lang=\"Fortran 90,f\"\n                             If \u0026lt;ext\u0026gt; is omitted, every file will be counted\n                             with the \u0026lt;lang\u0026gt; counter.  This option can be\n                             specified multiple times (but that is only\n                             useful when \u0026lt;ext\u0026gt; is given each time).\n                             See also --script-lang, --lang-no-ext.\n   --force-lang-def=\u0026lt;file\u0026gt;   Load language processing filters from \u0026lt;file\u0026gt;,\n                             then use these filters instead of the built-in\n                             filters.  Note:  languages which map to the same\n                             file extension (for example:\n                             MATLAB/Mathematica/Objective-C/MUMPS/Mercury;\n                             Pascal/PHP; Lisp/OpenCL; Lisp/Julia; Perl/Prolog)\n                             will be ignored as these require additional\n                             processing that is not expressed in language\n                             definition files.  Use --read-lang-def to define\n                             new language filters without replacing built-in\n                             filters (see also --write-lang-def,\n                             --write-lang-def-incl-dup).\n   --git                     Forces the inputs to be interpreted as git targets\n                             (commit hashes, branch names, et cetera) if these\n                             are not first identified as file or directory\n                             names.  This option overrides the --vcs=git logic\n                             if this is given; in other words, --git gets its\n                             list of files to work on directly from git using\n                             the hash or branch name rather than from\n                             'git ls-files'.  This option can be used with\n                             --diff to perform line count diffs between git\n                             commits, or between a git commit and a file,\n                             directory, or archive.  Use -v/--verbose to see\n                             the git system commands cloc issues.\n   --git-diff-rel            Same as --git --diff, or just --diff if the inputs\n                             are recognized as git targets.  Only files which\n                             have changed in either commit are compared.\n   --git-diff-all            Git diff strategy #2:  compare all files in the\n                             repository between the two commits.\n   --ignore-whitespace       Ignore horizontal white space when comparing files\n                             with --diff.  See also --ignore-case.\n   --ignore-case             Ignore changes in case within file contents;\n                             consider upper- and lowercase letters equivalent\n                             when comparing files with --diff.  See also\n                             --ignore-whitespace.\n   --ignore-case-ext         Ignore case of file name extensions.  This will\n                             cause problems counting some languages\n                             (specifically, .c and .C are associated with C and\n                             C++; this switch would count .C files as C rather\n                             than C++ on *nix operating systems).  File name\n                             case insensitivity is always true on Windows.\n   --lang-no-ext=\u0026lt;lang\u0026gt;      Count files without extensions using the \u0026lt;lang\u0026gt;\n                             counter.  This option overrides internal logic\n                             for files without extensions (where such files\n                             are checked against known scripting languages\n                             by examining the first line for #!).  See also\n                             --force-lang, --script-lang.\n   --max-file-size=\u0026lt;MB\u0026gt;      Skip files larger than \u0026lt;MB\u0026gt; megabytes when\n                             traversing directories.  By default, \u0026lt;MB\u0026gt;=100.\n                             cloc's memory requirement is roughly twenty times\n                             larger than the largest file so running with\n                             files larger than 100 MB on a computer with less\n                             than 2 GB of memory will cause problems.\n                             Note:  this check does not apply to files\n                             explicitly passed as command line arguments.\n   --no-autogen[=list]       Ignore files generated by code-production systems\n                             such as GNU autoconf.  To see a list of these files\n                             (then exit), run with --no-autogen list\n                             See also --autoconf.\n   --original-dir            [Only effective in combination with\n                             --strip-comments]  Write the stripped files\n                             to the same directory as the original files.\n   --read-binary-files       Process binary files in addition to text files.\n                             This is usually a bad idea and should only be\n                             attempted with text files that have embedded\n                             binary data.\n   --read-lang-def=\u0026lt;file\u0026gt;    Load new language processing filters from \u0026lt;file\u0026gt;\n                             and merge them with those already known to cloc.\n                             If \u0026lt;file\u0026gt; defines a language cloc already knows\n                             about, cloc's definition will take precedence.\n                             Use --force-lang-def to over-ride cloc's\n                             definitions (see also --write-lang-def,\n                             --write-lang-def-incl-dup).\n   --script-lang=\u0026lt;lang\u0026gt;,\u0026lt;s\u0026gt;  Process all files that invoke \u0026lt;s\u0026gt; as a #!\n                             scripting language with the counter for language\n                             \u0026lt;lang\u0026gt;.  For example, files that begin with\n                                #!/usr/local/bin/perl5.8.8\n                             will be counted with the Perl counter by using\n                                --script-lang=Perl,perl5.8.8\n                             The language name is case insensitive but the\n                             name of the script language executable, \u0026lt;s\u0026gt;,\n                             must have the right case.  This option can be\n                             specified multiple times.  See also --force-lang,\n                             --lang-no-ext.\n   --sdir=\u0026lt;dir\u0026gt;              Use \u0026lt;dir\u0026gt; as the scratch directory instead of\n                             letting File::Temp chose the location.  Files\n                             written to this location are not removed at\n                             the end of the run (as they are with File::Temp).\n   --skip-uniqueness         Skip the file uniqueness check.  This will give\n                             a performance boost at the expense of counting\n                             files with identical contents multiple times\n                             (if such duplicates exist).\n   --stat                    Some file systems (AFS, CD-ROM, FAT, HPFS, SMB)\n                             do not have directory 'nlink' counts that match\n                             the number of its subdirectories.  Consequently\n                             cloc may undercount or completely skip the\n                             contents of such file systems.  This switch forces\n                             File::Find to stat directories to obtain the\n                             correct count.  File search speed will decrease.\n                             See also --follow-links.\n   --stdin-name=\u0026lt;file\u0026gt;       Give a file name to use to determine the language\n                             for standard input.  (Use - as the input name to\n                             receive source code via STDIN.)\n   --strip-comments=\u0026lt;ext\u0026gt;    For each file processed, write to the current\n                             directory a version of the file which has blank\n                             and commented lines removed (in-line comments\n                             persist).  The name of each stripped file is the\n                             original file name with .\u0026lt;ext\u0026gt; appended to it.\n                             It is written to the current directory unless\n                             --original-dir is on.\n   --strip-str-comments      Replace comment markers embedded in strings with\n                             'xx'.  This attempts to work around a limitation\n                             in Regexp::Common::Comment where comment markers\n                             embedded in strings are seen as actual comment\n                             markers and not strings, often resulting in a\n                             'Complex regular subexpression recursion limit'\n                             warning and incorrect counts.  There are two\n                             disadvantages to using this switch:  1/code count\n                             performance drops, and 2/code generated with\n                             --strip-comments will contain different strings\n                             where ever embedded comments are found.\n   --sum-reports             Input arguments are report files previously\n                             created with the --report-file option in plain\n                             format (eg. not JSON, YAML, XML, or SQL).\n                             Makes a cumulative set of results containing the\n                             sum of data from the individual report files.\n   --timeout \u0026lt;N\u0026gt;             Ignore files which take more than \u0026lt;N\u0026gt; seconds\n                             to process at any of the language's filter stages.\n                             The default maximum number of seconds spent on a\n                             filter stage is the number of lines in the file\n                             divided by one thousand.  Setting \u0026lt;N\u0026gt; to 0 allows\n                             unlimited time.  See also --diff-timeout.\n   --processes=NUM           [Available only on systems with a recent version\n                             of the Parallel::ForkManager module.  Not\n                             available on Windows.] Sets the maximum number of\n                             cores that cloc uses.  The default value of 0\n                             disables multiprocessing.\n   --unix                    Override the operating system autodetection\n                             logic and run in UNIX mode.  See also\n                             --windows, --show-os.\n   --use-sloccount           If SLOCCount is installed, use its compiled\n                             executables c_count, java_count, pascal_count,\n                             php_count, and xml_count instead of cloc's\n                             counters.  SLOCCount's compiled counters are\n                             substantially faster than cloc's and may give\n                             a performance improvement when counting projects\n                             with large files.  However, these cloc-specific\n                             features will not be available: --diff,\n                             --count-and-diff, --strip-comments, --unicode.\n   --windows                 Override the operating system autodetection\n                             logic and run in Microsoft Windows mode.\n                             See also --unix, --show-os.\n\n Filter Options\n   --include-content=\u0026lt;regex\u0026gt; Only count files containing text that matches the\n                             given regular expression.\n   --exclude-content=\u0026lt;regex\u0026gt; Exclude files containing text that matches the given\n                             regular expression.\n   --exclude-dir=\u0026lt;D1\u0026gt;[,D2,]  Exclude the given comma separated directories\n                             D1, D2, D3, et cetera, from being scanned.  For\n                             example  --exclude-dir=.cache,test  will skip\n                             all files and subdirectories that have /.cache/\n                             or /test/ as their parent directory.\n                             Directories named .bzr, .cvs, .hg, .git, .svn,\n                             and .snapshot are always excluded.\n                             This option only works with individual directory\n                             names so including file path separators is not\n                             allowed.  Use --fullpath and --not-match-d=\u0026lt;regex\u0026gt;\n                             to supply a regex matching multiple subdirectories.\n   --exclude-ext=\u0026lt;ext1\u0026gt;[,\u0026lt;ext2\u0026gt;[...]]\n                             Do not count files having the given file name\n                             extensions.\n   --exclude-lang=\u0026lt;L1\u0026gt;[,L2[...]]\n                             Exclude the given comma separated languages\n                             L1, L2, L3, et cetera, from being counted.\n   --exclude-list-file=\u0026lt;file\u0026gt;  Ignore files and/or directories whose names\n                             appear in \u0026lt;file\u0026gt;.  \u0026lt;file\u0026gt; should have one file\n                             name per line.  Only exact matches are ignored;\n                             relative path names will be resolved starting from\n                             the directory where cloc is invoked.\n                             See also --list-file.\n   --fullpath                Modifies the behavior of --match-f, --not-match-f,\n                             and --not-match-d to include the file's path\n                             in the regex, not just the file's basename.\n                             (This does not expand each file to include its\n                             absolute path, instead it uses as much of\n                             the path as is passed in to cloc.)\n                             Note:  --match-d always looks at the full\n                             path and therefore is unaffected by --fullpath.\n   --include-ext=\u0026lt;ext1\u0026gt;[,ext2[...]]\n                             Count only languages having the given comma\n                             separated file extensions.  Use --show-ext to\n                             see the recognized extensions.\n   --include-lang=\u0026lt;L1\u0026gt;[,L2[...]]\n                             Count only the given comma separated languages\n                             L1, L2, L3, et cetera.  Use --show-lang to see\n                             the list of recognized languages.\n   --match-d=\u0026lt;regex\u0026gt;         Only count files in directories matching the Perl\n                             regex.  For example\n                               --match-d='/(src|include)/'\n                             only counts files in directories containing\n                             /src/ or /include/.  Unlike --not-match-d,\n                             --match-f, and --not-match-f, --match-d always\n                             compares the fully qualified path against the\n                             regex.\n   --not-match-d=\u0026lt;regex\u0026gt;     Count all files except those in directories\n                             matching the Perl regex.  Only the trailing\n                             directory name is compared, for example, when\n                             counting in /usr/local/lib, only 'lib' is\n                             compared to the regex.\n                             Add --fullpath to compare parent directories to\n                             the regex.\n                             Do not include file path separators at the\n                             beginning or end of the regex.\n   --match-f=\u0026lt;regex\u0026gt;         Only count files whose basenames match the Perl\n                             regex.  For example\n                               --match-f='^[Ww]idget'\n                             only counts files that start with Widget or widget.\n                             Add --fullpath to include parent directories\n                             in the regex instead of just the basename.\n   --not-match-f=\u0026lt;regex\u0026gt;     Count all files except those whose basenames\n                             match the Perl regex.  Add --fullpath to include\n                             parent directories in the regex instead of just\n                             the basename.\n   --skip-archive=\u0026lt;regex\u0026gt;    Ignore files that end with the given Perl regular\n                             expression.  For example, if given\n                               --skip-archive='(zip|tar(.(gz|Z|bz2|xz|7z))?)'\n                             the code will skip files that end with .zip,\n                             .tar, .tar.gz, .tar.Z, .tar.bz2, .tar.xz, and\n                             .tar.7z.\n   --skip-win-hidden         On Windows, ignore hidden files.\n\n Debug Options\n   --categorized=\u0026lt;file\u0026gt;      Save file sizes in bytes, identified languages\n                             and names of categorized files to \u0026lt;file\u0026gt;.\n   --counted=\u0026lt;file\u0026gt;          Save names of processed source files to \u0026lt;file\u0026gt;.\n   --diff-alignment=\u0026lt;file\u0026gt;   Write to \u0026lt;file\u0026gt; a list of files and file pairs\n                             showing which files were added, removed, and/or\n                             compared during a run with --diff.  This switch\n                             forces the --diff mode on.\n   --explain=\u0026lt;lang\u0026gt;          Print the filters used to remove comments for\n                             language \u0026lt;lang\u0026gt; and exit.  In some cases the\n                             filters refer to Perl subroutines rather than\n                             regular expressions.  An examination of the\n                             source code may be needed for further explanation.\n   --help                    Print this usage information and exit.\n   --found=\u0026lt;file\u0026gt;            Save names of every file found to \u0026lt;file\u0026gt;.\n   --ignored=\u0026lt;file\u0026gt;          Save names of ignored files and the reason they\n                             were ignored to \u0026lt;file\u0026gt;.\n   --print-filter-stages     Print processed source code before and after\n                             each filter is applied.\n   --show-ext[=\u0026lt;ext\u0026gt;]        Print information about all known (or just the\n                             given) file extensions and exit.\n   --show-lang[=\u0026lt;lang\u0026gt;]      Print information about all known (or just the\n                             given) languages and exit.\n   --show-os                 Print the value of the operating system mode\n                             and exit.  See also --unix, --windows.\n   -v[=\u0026lt;n\u0026gt;]                  Verbose switch (optional numeric value).\n   -verbose[=\u0026lt;n\u0026gt;]            Long form of -v.\n   --version                 Print the version of this program and exit.\n   --write-lang-def=\u0026lt;file\u0026gt;   Writes to \u0026lt;file\u0026gt; the language processing filters\n                             then exits.  Useful as a first step to creating\n                             custom language definitions. Note: languages which\n                             map to the same file extension will be excluded.\n                             (See also --force-lang-def, --read-lang-def).\n   --write-lang-def-incl-dup=\u0026lt;file\u0026gt;\n                             Same as --write-lang-def, but includes duplicated\n                             extensions.  This generates a problematic language\n                             definition file because cloc will refuse to use\n                             it until duplicates are removed.\n\n Output Options\n   --3                       Print third-generation language output.\n                             (This option can cause report summation to fail\n                             if some reports were produced with this option\n                             while others were produced without it.)\n   --by-percent  X           Instead of comment and blank line counts, show\n                             these values as percentages based on the value\n                             of X in the denominator:\n                                X = 'c'   -\u0026gt; # lines of code\n                                X = 'cm'  -\u0026gt; # lines of code + comments\n                                X = 'cb'  -\u0026gt; # lines of code + blanks\n                                X = 'cmb' -\u0026gt; # lines of code + comments + blanks\n                             For example, if using method 'c' and your code\n                             has twice as many lines of comments as lines\n                             of code, the value in the comment column will\n                             be 200%.  The code column remains a line count.\n   --csv                     Write the results as comma separated values.\n   --csv-delimiter=\u0026lt;C\u0026gt;       Use the character \u0026lt;C\u0026gt; as the delimiter for comma\n                             separated files instead of ,.  This switch forces --csv to be on.\n   --file-encoding=\u0026lt;E\u0026gt;       Write output files using the \u0026lt;E\u0026gt; encoding instead of\n                             the default ASCII (\u0026lt;E\u0026gt; = 'UTF-7').  Examples: 'UTF-16',\n                             'euc-kr', 'iso-8859-16'.  Known encodings can be\n                             printed with\n                               perl -MEncode -e 'print join(\"\\n\", Encode-\u0026gt;encodings(\":all\")), \"\\n\"'\n   --hide-rate               Do not show line and file processing rates in the\n                             output header. This makes output deterministic.\n   --json                    Write the results as JavaScript Object Notation\n                             (JSON) formatted output.\n   --md                      Write the results as Markdown-formatted text.\n   --out=\u0026lt;file\u0026gt;              Synonym for --report-file=\u0026lt;file\u0026gt;.\n   --progress-rate=\u0026lt;n\u0026gt;       Show progress update after every \u0026lt;n\u0026gt; files are\n                             processed (default \u0026lt;n\u0026gt;=100).  Set \u0026lt;n\u0026gt; to 0 to\n                             suppress progress output (useful when redirecting\n                             output to STDOUT).\n   --quiet                   Suppress all information messages except for\n                             the final report.\n   --report-file=\u0026lt;file\u0026gt;      Write the results to \u0026lt;file\u0026gt; instead of STDOUT.\n   --sql=\u0026lt;file\u0026gt;              Write results as SQL create and insert statements\n                             which can be read by a database program such as\n                             SQLite.  If \u0026lt;file\u0026gt; is -, output is sent to STDOUT.\n   --sql-append              Append SQL insert statements to the file specified\n                             by --sql and do not generate table creation\n                             statements.  Only valid with the --sql option.\n   --sql-project=\u0026lt;name\u0026gt;      Use \u0026lt;name\u0026gt; as the project identifier for the\n                             current run.  Only valid with the --sql option.\n   --sql-style=\u0026lt;style\u0026gt;       Write SQL statements in the given style instead\n                             of the default SQLite format.  Styles include\n                             'Oracle' and 'Named_Columns'.\n   --sum-one                 For plain text reports, show the SUM: output line\n                             even if only one input file is processed.\n   --xml                     Write the results in XML.\n   --xsl=\u0026lt;file\u0026gt;              Reference \u0026lt;file\u0026gt; as an XSL stylesheet within\n                             the XML output.  If \u0026lt;file\u0026gt; is 1 (numeric one),\n                             writes a default stylesheet, cloc.xsl (or\n                             cloc-diff.xsl if --diff is also given).\n                             This switch forces --xml on.\n   --yaml                    Write the results in YAML.\n\u003c/pre\u003e\n[](1}}})\n\u003ca name=\"Languages\"\u003e\u003c/a\u003e []({{{1)\n# [Recognized Languages \u0026#9650;](#___top \"click to go to top of document\")\n\n\u003cpre\u003e\nprompt\u003e cloc --show-lang\n\nABAP                       (abap)\nActionScript               (as)\nAda                        (ada, adb, ads, pad)\nADSO/IDSM                  (adso)\nAgda                       (agda, lagda)\nAMPLE                      (ample, dofile, startup)\nAnsProlog                  (lp)\nAnt                        (build.xml, build.xml)\nANTLR Grammar              (g, g4)\nApex Class                 (cls)\nApex Trigger               (trigger)\nAPL                        (apl, apla, aplc, aplf, apli, apln, aplo, dyalog, dyapp, mipage)\nAppleScript                (applescript)\nArduino Sketch             (ino)\nArkTs                      (ets)\nArturo                     (art)\nAsciiDoc                   (adoc, asciidoc)\nASP                        (asa, ashx, asp, axd)\nASP.NET                    (asax, ascx, asmx, aspx, master, sitemap, webinfo)\nAspectJ                    (aj)\nAssembly                   (a51, asm, nasm, S, s)\nAstro                      (astro)\nAsymptote                  (asy)\nAutoHotkey                 (ahk, ahkl)\nawk                        (auk, awk, gawk, mawk, nawk)\nBazel                      (BUILD)\nBizTalk Orchestration      (odx)\nBizTalk Pipeline           (btp)\nBlade                      (blade, blade.php)\nBourne Again Shell         (bash)\nBourne Shell               (sh)\nBrightScript               (brs)\nbuilder                    (xml.builder)\nC                          (c, cats, ec, idc, pgc)\nC Shell                    (csh, tcsh)\nC#                         (cs)\nC# Designer                (designer.cs)\nC++                        (C, c++, c++m, cc, ccm, CPP, cpp, cppm, cxx, cxxm, h++, inl, ipp, ixx, pcc, tcc, tpp)\nC/C++ Header               (H, h, hh, hpp, hxx)\nCairo                      (cairo)\nCake Build Script          (cake)\nCarbon                     (carbon)\nCCS                        (ccs)\nChapel                     (chpl)\nCircom                     (circom)\nClean                      (dcl, icl)\nClojure                    (boot, cl2, clj, cljs.hl, cljscm, cljx, hic, riemann.config)\nClojureC                   (cljc)\nClojureScript              (cljs)\nCMake                      (cmake, cmake.in, CMakeLists.txt)\nCOBOL                      (CBL, cbl, ccp, COB, cob, cobol, cpy)\nCoCoA 5                    (c5, cocoa5, cocoa5server, cpkg5)\nCoffeeScript               (_coffee, cakefile, cjsx, coffee, iced)\nColdFusion                 (cfm, cfml)\nColdFusion CFScript        (cfc)\nConstraint Grammar         (cg3, rlx)\nContainerfile              (Containerfile)\nCoq                        (v)\nCrystal                    (cr)\nCSON                       (cson)\nCSS                        (css)\nCSV                        (csv)\nCucumber                   (feature)\nCUDA                       (cu, cuh)\nCython                     (pxd, pxi, pyx)\nD                          (d)\nDafny                      (dfy)\nDAL                        (da)\nDart                       (dart)\nDelphi Form                (dfm)\nDenizenScript              (dsc)\nDerw                       (derw)\ndhall                      (dhall)\nDIET                       (dt)\ndiff                       (diff, patch)\nDITA                       (dita)\nDockerfile                 (Dockerfile, dockerfile)\nDOORS Extension Language   (dxl)\nDOS Batch                  (BAT, bat, BTM, btm, CMD, cmd)\nDrools                     (drl)\nDTD                        (dtd)\ndtrace                     (d)\nECPP                       (ecpp)\nEEx                        (eex)\nEJS                        (ejs)\nElixir                     (ex, exs)\nElm                        (elm)\nEmbedded Crystal           (ecr)\nERB                        (ERB, erb)\nErlang                     (app.src, emakefile, erl, hrl, rebar.config, rebar.config.lock, rebar.lock, xrl, yrl)\nExpect                     (exp)\nF#                         (fsi, fs, fs)\nF# Script                  (fsx)\nFennel                     (fnl)\nFinite State Language      (fsl, jssm)\nFish Shell                 (fish)\nFlatbuffers                (fbs)\nFocus                      (focexec)\nForth                      (4th, e4, f83, fb, forth, fpm, fr, frt, ft, fth, rx, fs, f, for)\nFortran 77                 (F, F77, f77, FOR, FTN, ftn, pfo, f, for)\nFortran 90                 (F90, f90)\nFortran 95                 (F95, f95)\nFreemarker Template        (ftl)\nFuthark                    (fut)\nFXML                       (fxml)\nGDScript                   (gd)\nGencat NLS                 (msg)\nGlade                      (glade, ui)\nGleam                      (gleam)\nGlimmer JavaScript         (gjs)\nGlimmer TypeScript         (gts)\nGLSL                       (comp, fp, frag, frg, fsh, fshader, geo, geom, glsl, glslv, gshader, tesc, tese, vert, vrx, vsh, vshader)\nGo                         (go, ʕ◔ϖ◔ʔ)\nGodot Resource             (tres)\nGodot Scene                (tscn)\nGodot Shaders              (gdshader)\nGradle                     (gradle, gradle.kts)\nGrails                     (gsp)\nGraphQL                    (gql, graphql, graphqls)\nGroovy                     (gant, groovy, grt, gtpl, gvy, jenkinsfile)\nHaml                       (haml, haml.deface)\nHandlebars                 (handlebars, hbs)\nHarbour                    (hb)\nHare                       (ha)\nHaskell                    (hs, hsc, lhs)\nHaxe                       (hx, hxsl)\nHCL                        (hcl, nomad, tf, tfvars)\nHLSL                       (cg, cginc, fxh, hlsl, hlsli, shader)\nHolyC                      (HC)\nHoon                       (hoon)\nHTML                       (htm, html, html.hl, xht)\nHTML EEx                   (heex)\nIDL                        (dlm, idl, pro)\nIdris                      (idr)\nIgor Pro                   (ipf)\nImba                       (imba)\nINI                        (buildozer.spec, editorconfig, ini, lektorproject, prefs)\nInstallShield              (ism)\nIPL                        (ipl)\nJai                        (jai)\nJanet                      (janet)\nJava                       (java)\nJavaScript                 (_js, bones, cjs, es6, jake, jakefile, js, jsb, jscad, jsfl, jsm, jss, mjs, njs, pac, sjs, ssjs, xsjs, xsjslib)\nJavaServer Faces           (jsf)\nJCL                        (jcl)\nJinja Template             (j2, jinja, jinja2)\nJSON                       (arcconfig, avsc, composer.lock, geojson, gltf, har, htmlhintrc, json, json-tmlanguage, jsonl, mcmeta, mcmod.info, tern-config, tern-project, tfstate, tfstate.backup, topojson, watchmanconfig, webapp, webmanifest, yyp)\nJSON5                      (json5)\nJSP                        (jsp, jspf)\nJSX                        (jsx)\nJulia                      (jl)\nJuniper Junos              (junos)\nJupyter Notebook           (ipynb)\nKermit                     (ksc)\nKorn Shell                 (ksh)\nKotlin                     (kt, ktm, kts)\nkvlang                     (kv)\nLean                       (hlean, lean)\nLem                        (lem)\nLESS                       (less)\nlex                        (l, lex)\nLFE                        (lfe)\nLinker Script              (ld)\nliquid                     (liquid)\nLisp                       (asd, el, lisp, lsp, cl, jl)\nLiterate Idris             (lidr)\nLiveLink OScript           (oscript)\nLLVM IR                    (ll)\nLogos                      (x, xm)\nLogtalk                    (lgt, logtalk)\nLua                        (lua, nse, p8, pd_lua, rbxs, wlua)\nLuau                       (luau)\nm4                         (ac, m4)\nmake                       (am, Gnumakefile, gnumakefile, Makefile, makefile, mk)\nMako                       (mako, mao)\nMarkdown                   (contents.lr, markdown, md, mdown, mdwn, mdx, mkd, mkdn, mkdown, ronn, workbook)\nMathematica                (cdf, ma, mathematica, mt, nbp, wl, wlt, m)\nMATLAB                     (m)\nMaven                      (pom, pom.xml)\nMeson                      (meson.build)\nMetal                      (metal)\nModelica                   (mo)\nModula3                    (i3, ig, m3, mg)\nMojo                       (mojo, 🔥)\nMojom                      (mojom)\nMoonBit                    (mbt, mbti, mbtx, mbty)\nMSBuild script             (btproj, csproj, msbuild, vcproj, wdproj, wixproj)\nMUMPS                      (mps, m)\nMustache                   (mustache)\nMXML                       (mxml)\nNAnt script                (build)\nNASTRAN DMAP               (dmap)\nNemerle                    (n)\nNetLogo                    (nlogo, nls)\nNickel                     (ncl)\nNim                        (nim, nim.cfg, nimble, nimrod, nims)\nNix                        (nix)\nNunjucks                   (njk)\nObjective-C                (m)\nObjective-C++              (mm)\nOCaml                      (eliom, eliomi, ml, ml4, mli, mll, mly)\nOdin                       (odin)\nOpenCL                     (cl)\nOpenSCAD                   (scad)\nOracle Forms               (fmt)\nOracle PL/SQL              (bod, fnc, prc, spc, trg)\nOracle Reports             (rex)\nP4                         (p4)\nPascal                     (dpr, lpr, pas, pascal)\nPascal/Pawn                (p)\nPascal/Puppet              (pp)\nPatran Command Language    (pcl, ses)\nPawn                       (pawn, pwn)\nPEG                        (peg)\npeg.js                     (pegjs)\npeggy                      (peggy)\nPerl                       (ack, al, cpanfile, makefile.pl, perl, ph, plh, plx, pm, psgi, rexfile, pl, p6)\nPest                       (pest)\nPHP                        (aw, ctp, phakefile, php, php3, php4, php5, php_cs, php_cs.dist, phps, phpt, phtml)\nPHP/Pascal/Fortran/Pawn    (inc)\nPig Latin                  (pig)\nPL/I                       (pl1)\nPL/M                       (lit, plm)\nPlantUML                   (iuml, plantuml, pu, puml, wsd)\nPO File                    (po)\nPony                       (pony)\nPowerBuilder               (pbt, sra, srf, srm, srs, sru, srw)\nPowerShell                 (ps1, psd1, psm1)\nPrisma Schema              (prisma)\nProcessing                 (pde)\nProGuard                   (pro)\nProlog                     (P, prolog, yap, pl, p6, pro)\nProperties                 (properties)\nProtocol Buffers           (proto)\nPRQL                       (prql)\nPug                        (jade, pug)\nPureScript                 (purs)\nPython                     (buck, build.bazel, gclient, gyp, gypi, lmi, py, py3, pyde, pyi, pyp, pyt, pyw, sconscript, sconstruct, snakefile, tac, workspace, wscript, wsgi, xpy)\nQML                        (qbs, qml)\nQt                         (ui)\nQt Linguist                (ts)\nQt Project                 (pro)\nR                          (expr-dist, R, r, rd, rprofile, rsx)\nRacket                     (rkt, rktd, rktl, scrbl)\nRaku                       (pm6, raku, rakumod)\nRaku/Prolog                (P6, p6)\nRAML                       (raml)\nRapydScript                (pyj)\nRazor                      (cshtml, razor)\nReasonML                   (re, rei)\nReScript                   (res, resi)\nreStructuredText           (rest, rest.txt, rst, rst.txt)\nRexx                       (pprx, rexx)\nRing                       (rform, rh, ring)\nRmd                        (Rmd)\nRobotFramework             (robot)\nRuby                       (appraisals, berksfile, brewfile, builder, buildfile, capfile, dangerfile, deliverfile, eye, fastfile, gemfile, gemfile.lock, gemspec, god, guardfile, irbrc, jarfile, jbuilder, mavenfile, mspec, podfile, podspec, pryrc, puppetfile, rabl, rake, rb, rbuild, rbw, rbx, ru, snapfile, thor, thorfile, vagrantfile, watchr)\nRuby HTML                  (rhtml)\nRust                       (rs, rs.in)\nSaltStack                  (sls)\nSAS                        (sas)\nSass                       (sass)\nScala                      (kojo, sbt, scala)\nScheme                     (sc, sch, scm, sld, sps, ss, sls)\nSCSS                       (scss)\nsed                        (sed)\nSKILL                      (il)\nSKILL++                    (ils)\nSlice                      (ice)\nSlim                       (slim)\nSlint                      (slint)\nSmalltalk                  (st, cs)\nSmarty                     (smarty, tpl)\nSnakemake                  (rules, smk)\nSoftbridge Basic           (SBL, sbl)\nSolidity                   (sol)\nSparForte                  (sp)\nSpecman e                  (e)\nSQL                        (cql, mysql, psql, SQL, sql, tab, udf, viw)\nSQL Data                   (data.sql)\nSQL Stored Procedure       (spc.sql, spoc.sql, sproc.sql, udf.sql)\nSquirrel                   (nut)\nStandard ML                (fun, sig, sml)\nStarlark                   (bazel, bzl)\nStata                      (ado, DO, do, doh, ihlp, mata, matah, sthlp)\nStylus                     (styl)\nSugarSS                    (sss)\nSvelte                     (svelte)\nSVG                        (SVG, svg)\nSwift                      (swift)\nSWIG                       (i)\nTableGen                   (td)\nTcl/Tk                     (itk, tcl, tk)\nTEAL                       (teal)\nTeamcenter met             (met)\nTeamcenter mth             (mth)\nTempl                      (templ)\nTeX                        (aux, bbx, bib, bst, cbx, dtx, ins, lbx, ltx, mkii, mkiv, mkvi, sty, tex, cls)\nText                       (text, txt)\nThrift                     (thrift)\nTITAN Project File Information (tpd)\nTitanium Style Sheet       (tss)\nTLA+                       (tla)\nTNSDL                      (cii, cin, in1, in2, in3, in4, inf, interface, rou, sdl, sdt, spd, ssc, sst)\nTOML                       (toml)\ntspeg                      (jspeg, tspeg)\nTTCN                       (ttcn, ttcn2, ttcn3, ttcnpp)\nTwig                       (twig)\nTypeScript                 (mts, tsx, ts)\nTypst                      (typ)\nUmka                       (um)\nUnity-Prefab               (mat, prefab)\nVala                       (vala)\nVala Header                (vapi)\nVB for Applications        (VBA, vba)\nVelocity Template Language (vm)\nVerilog-SystemVerilog      (sv, svh, v)\nVHDL                       (VHD, vhd, VHDL, vhdl, vhf, vhi, vho, vhs, vht, vhw)\nvim script                 (vim)\nVisual Basic               (BAS, bas, ctl, dsr, frm, FRX, frx, VBHTML, vbhtml, vbp, vbw, cls)\nVisual Basic .NET          (VB, vb, vbproj)\nVisual Basic Script        (VBS, vbs)\nVisual Fox Pro             (SCA, sca)\nVisual Studio Solution     (sln)\nVisualforce Component      (component)\nVisualforce Page           (page)\nVuejs Component            (vue)\nVyper                      (vy)\nWeb Services Description   (wsdl)\nWebAssembly                (wast, wat)\nWGSL                       (wgsl)\nWindows Message File       (mc)\nWindows Module Definition  (def)\nWindows Resource File      (rc, rc2)\nWiX include                (wxi)\nWiX source                 (wxs)\nWiX string localization    (wxl)\nWXML                       (wxml)\nWXSS                       (wxss)\nX++                        (xpo)\nXAML                       (xaml)\nxBase                      (prg, prw)\nxBase Header               (ch)\nXHTML                      (xhtml)\nXMI                        (XMI, xmi)\nXML                        (adml, admx, ant, app.config, axml, builds, ccproj, ccxml, classpath, clixml, cproject, cscfg, csdef, csl, ct, depproj, ditamap, ditaval, dll.config, dotsettings, filters, fsproj, gmx, grxml, iml, ivy, jelly, jsproj, kml, launch, mdpolicy, mjml, natvis, ndproj, nproj, nuget.config, nuspec, odd, osm, packages.config, pkgproj, plist, proj, project, props, ps1xml, psc1, pt, rdf, resx, rss, scxml, settings.stylecop, sfproj, shproj, srdf, storyboard, sttheme, sublime-snippet, targets, tmcommand, tml, tmlanguage, tmpreferences, tmsnippet, tmtheme, urdf, ux, vcxproj, vsixmanifest, vssettings, vstemplate, vxml, web.config, web.debug.config, web.release.config, wsf, x3d, xacro, xib, xlf, xliff, XML, xml, xml.dist, xproj, xspec, xul, zcml)\nXQuery                     (xq, xql, xqm, xquery, xqy)\nXSD                        (XSD, xsd)\nXSLT                       (XSL, xsl, XSLT, xslt)\nXtend                      (xtend)\nyacc                       (y, yacc)\nYAML                       (clang-format, clang-tidy, gemrc, glide.lock, mir, reek, rviz, sublime-syntax, syntax, yaml, yaml-tmlanguage, yml, yml.mysql)\nYang                       (yang)\nZig                        (zig)\nzsh                        (zsh)\n\u003c/pre\u003e\n\nThe above list can be customized by reading language definitions from a\nfile with the `--read-lang-def` or `--force-lang-def` options.\n\nThese file extensions map to multiple languages:\n\n*   `cj`  files could be Clojure or Cangjie\n*   `cl`  files could be Lisp or OpenCL\n*   `cls` files could be Visual Basic, TeX or Apex Class\n*   `cs`  files could be C# or Smalltalk\n*   `d`   files could be D or dtrace\n*   `f`   files could be Fortran 77 or Forth\n*   `fnc` files could be Oracle PL or SQL\n*   `for` files could be Fortran 77 or Forth\n*   `fs`  files could be F# or Forth\n*   `inc` files could be PHP or Pascal\n*   `itk` files could be Tcl or Tk\n*   `jl`  files could be Lisp or Julia\n*   `lit` files could be PL or M\n*   `m`   files could be MATLAB, Mathematica, Objective-C, MUMPS or Mercury\n*   `p6`  files could be Perl or Prolog\n*   `pl`  files could be Perl or Prolog\n*   `PL`  files could be Perl or Prolog\n*   `pp`  files could be Pascal or Puppet\n*   `pro` files could be IDL, Qt Project, Prolog or ProGuard\n*   `ts`  files could be TypeScript or Qt Linguist\n*   `ui`  files could be Qt or Glade\n*   `v`   files could be Verilog-SystemVerilog or Coq\n\ncloc has subroutines that attempt to identify the correct language based\non the file's contents for these special cases. Language identification\naccuracy is a function of how much code the file contains; .m files with\njust one or two lines for example, seldom have enough information to\ncorrectly distinguish between MATLAB, Mercury, MUMPS, or Objective-C.\n\nLanguages with file extension collisions are difficult to customize with\n`--read-lang-def` or `--force-lang-def` as they have no mechanism to\nidentify languages with common extensions. In this situation one must\nmodify the cloc source code.\n[](1}}})\n\u003ca name=\"How_it_works\"\u003e\u003c/a\u003e []({{{1)\n# [How It Works \u0026#9650;](#___top \"click to go to top of document\")\n\ncloc's method of operation resembles SLOCCount's: First, create a list\nof files to consider. Next, attempt to determine whether or not found\nfiles contain recognized computer language source code. Finally, for\nfiles identified as source files, invoke language-specific routines to\ncount the number of source lines.\n\nA more detailed description:\n\n1.  If the input file is an archive (such as a .tar.gz or .zip file),\n    create a temporary directory and expand the archive there using a\n    system call to an appropriate underlying utility (tar, bzip2, unzip,\n    etc) then add this temporary directory as one of the inputs. (This\n    works more reliably on Unix than on Windows.)\n2.  Use File::Find to recursively descend the input directories and make\n    a list of candidate file names. Ignore binary and zero-sized files.\n3.  Make sure the files in the candidate list have unique contents\n    (first by comparing file sizes, then, for similarly sized files,\n    compare MD5 hashes of the file contents with Digest::MD5). For each\n    set of identical files, remove all but the first copy, as determined\n    by a lexical sort, of identical files from the set. The removed\n    files are not included in the report. (The `--skip-uniqueness` switch\n    disables the uniqueness tests and forces all copies of files to be\n    included in the report.) See also the `--ignored=` switch to see which\n    files were ignored and why.\n4.  Scan the candidate file list for file extensions which cloc\n    associates with programming languages (see the `--show-lang` and\n    `--show-ext` options). Files which match are classified as\n    containing source\n    code for that language. Each file without an extension is opened\n    and its first line read to see if it is a Unix shell script\n    (anything that begins with #!). If it is shell script, the file is\n    classified by that scripting language (if the language is\n    recognized). If the file does not have a recognized extension or is\n    not a recognized scripting language, the file is ignored.\n5.  All remaining files in the candidate list should now be source files\n    for known programming languages. For each of these files:\n\n    1.  Read the entire file into memory.\n    2.  Count the number of lines (= L\u003csub\u003eoriginal\u003c/sub\u003e).\n    3.  Remove blank lines, then count again (= L\u003csub\u003enon_blank\u003c/sub\u003e).\n    4.  Loop over the comment filters defined for this language. (For\n        example, C++ has two filters: (1) remove lines that start with\n        optional whitespace followed by // and (2) remove text between\n        /* and */) Apply each filter to the code to remove comments.\n        Count the left over lines (= L\u003csub\u003ecode\u003c/sub\u003e).\n    5.  Save the counts for this language:\n        * blank lines = L\u003csub\u003eoriginal\u003c/sub\u003e - L\u003csub\u003enon_blank\u003c/sub\u003e\n        * comment lines = L\u003csub\u003enon_blank\u003c/sub\u003e - L\u003csub\u003ecode\u003c/sub\u003e\n        * code lines = L\u003csub\u003ecode\u003c/sub\u003e\n\nThe options modify the algorithm slightly. The `--read-lang-def` option\nfor example allows the user to read definitions of comment filters,\nknown file extensions, and known scripting languages from a file. The\ncode for this option is processed between Steps 2 and 3.\n[](1}}})\n\u003ca name=\"Advanced_Use\"\u003e\u003c/a\u003e []({{{1)\n# [Advanced Use \u0026#9650;](#___top \"click to go to top of document\")\n[](1}}})\n\u003ca name=\"strip_comments\"\u003e\u003c/a\u003e []({{{1)\n##  [Remove Comments from Source Code \u0026#9650;](#___top \"click to go to top of document\")\n\nHow can you tell if cloc correctly identifies comments? One way to\nconvince yourself cloc is doing the right thing is to use its\n`--strip-comments` option to remove comments and blank lines from files, then\ncompare the stripped-down files to originals.\n\nLet's try this out with the SQLite amalgamation, a C file containing all\ncode needed to build the SQLite library along with a header file:\n\n\u003cpre\u003e\nprompt\u003e tar zxf sqlite-amalgamation-3.5.6.tar.gz\nprompt\u003e cd sqlite-3.5.6/\nprompt\u003e cloc --strip-comments=nc sqlite.c\n       1 text file.\n       1 unique file.\nWrote sqlite3.c.nc\n       0 files ignored.\n\nhttp://cloc.sourceforge.net v 1.03  T=1.0 s (1.0 files/s, 82895.0 lines/s)\n-------------------------------------------------------------------------------\nLanguage          files     blank   comment      code    scale   3rd gen. equiv\n-------------------------------------------------------------------------------\nC                     1      5167     26827     50901 x   0.77 =       39193.77\n-------------------------------------------------------------------------------\n\u003c/pre\u003e\n\nThe extension argument given to --strip-comments is arbitrary; here nc was used as an abbreviation for \"no comments\".\n\ncloc removed over 31,000 lines from the file:\n\n\u003cpre\u003e\nprompt\u003e wc -l sqlite3.c sqlite3.c.nc\n  82895 sqlite3.c\n  50901 sqlite3.c.nc\n 133796 total\nprompt\u003e echo \"82895 - 50901\" | bc\n31994\n\u003c/pre\u003e\n\nWe can now compare the original file, sqlite3.c and the one stripped of\ncomments, sqlite3.c.nc with tools like diff or vimdiff and see what\nexactly cloc considered comments and blank lines. A rigorous proof that\nthe stripped-down file contains the same C code as the original is to\ncompile these files and compare checksums of the resulting object files.\n\nFirst, the original source file:\n\n\u003cpre\u003e\nprompt\u003e gcc -c sqlite3.c\nprompt\u003e md5sum sqlite3.o\ncce5f1a2ea27c7e44b2e1047e2588b49  sqlite3.o\n\u003c/pre\u003e\n\nNext, the version without comments:\n\n\u003cpre\u003e\nprompt\u003e mv sqlite3.c.nc sqlite3.c\nprompt\u003e gcc -c sqlite3.c\nprompt\u003e md5sum sqlite3.o\ncce5f1a2ea27c7e44b2e1047e2588b49  sqlite3.o\n\u003c/pre\u003e\n\ncloc removed over 31,000 lines of comments and blanks but did not modify the source code in any significant way since the resulting object file matches the original.\n[](1}}})\n\u003ca name=\"compressed_arch\"\u003e\u003c/a\u003e []({{{1)\n##  [Work with Compressed Archives \u0026#9650;](#___top \"click to go to top of document\")\nVersions of cloc before v1.07 required an\n `--extract-with=CMD` option to tell cloc how\nto expand an archive file.  Beginning with v1.07 this is extraction is\nattempted automatically.  At the moment the automatic extraction method works\nreasonably well on Unix-type OS's for the following file types:\n`.tar.gz`,\n`.tar.bz2`,\n`.tar.xz`,\n`.tgz`,\n`.zip`,\n`.ear`,\n`.deb`.\nSome of these extensions work on Windows if one has WinZip installed\nin the default location (`C:\\Program Files\\WinZip\\WinZip32.exe`).\nAdditionally, with newer versions of WinZip, the\n[http://www.winzip.com/downcl.htm](command line add-on)\nis needed for correct operation; in this case one would invoke cloc with\nsomething like \u003cbr\u003e\n\u003cpre\u003e\n --extract-with=\"\\\"c:\\Program Files\\WinZip\\wzunzip\\\" -e -o \u0026gt;FILE\u0026lt; .\"\n \u003c/code\u003e\n\u003c/pre\u003e\nRef. http://sourceforge.net/projects/cloc/forums/forum/600963/topic/4021070?message=8938196\n\nIn situations where the automatic extraction fails, one can try the\n`--extract-with=CMD`\noption to count lines of code within tar files, Zip files, or\nother compressed archives for which one has an extraction tool.\ncloc takes the user-provided extraction command and expands the archive\nto a temporary directory (created with File::Temp),\ncounts the lines of code in the temporary directory,\nthen removes that directory.  While not especially helpful when dealing\nwith a single compressed archive (after all, if you're going to type\nthe extraction command anyway why not just manually expand the archive?)\nthis option is handy for working with several archives at once.\n\nFor example, say you have the following source tarballs on a Unix machine\u003cbr\u003e\n\n    perl-5.8.5.tar.gz\n    Python-2.4.2.tar.gz\n\nand you want to count all the code within them.  The command would be\n\u003cpre\u003e\ncloc --extract-with='gzip -dc \u0026gt;FILE\u0026lt; | tar xf -' perl-5.8.5.tar.gz Python-2.4.2.tar.gz\n\u003c/pre\u003e\nIf that Unix machine has GNU tar (which can uncompress and extract in\none step) the command can be shortened to\n\u003cpre\u003e\ncloc --extract-with='tar zxf \u0026gt;FILE\u0026lt;' perl-5.8.5.tar.gz Python-2.4.2.tar.gz\n\u003c/pre\u003e\nOn a Windows computer with WinZip installed in\n`c:\\Program Files\\WinZip` the command would look like\n\u003cpre\u003e\ncloc.exe --extract-with=\"\\\"c:\\Program Files\\WinZip\\WinZip32.exe\\\" -e -o \u0026gt;FILE\u0026lt; .\" perl-5.8.5.tar.gz Python-2.4.2.tar.gz\n\u003c/pre\u003e\nJava `.ear` files are Zip files that contain additional Zip\nfiles.  cloc can handle nested compressed archives without\ndifficulty--provided all such files are compressed and archived in the\nsame way.  Examples of counting a\nJava `.ear` file in Unix and Windows:\n\u003cpre\u003e\n\u003ci\u003eUnix\u0026gt;\u003c/i\u003e cloc --extract-with=\"unzip -d . \u0026gt;FILE\u0026lt; \" Project.ear\n\u003ci\u003eDOS\u0026gt;\u003c/i\u003e cloc.exe --extract-with=\"\\\"c:\\Program Files\\WinZip\\WinZip32.exe\\\" -e -o \u0026gt;FILE\u0026lt; .\" Project.ear\n\u003c/pre\u003e\n\n[](1}}})\n\u003ca name=\"diff\"\u003e\u003c/a\u003e []({{{1)\n##  [Differences \u0026#9650;](#___top \"click to go to top of document\")\nThe `--diff` switch allows one to measure the relative change in\nsource code and comments between two versions of a file, directory,\nor archive.  Differences reveal much more than absolute code\ncounts of two file versions.  For example, say a source file\nhas 100 lines and its developer delivers a newer version with\n102 lines.  Did the developer add two comment lines,\nor delete seventeen source\nlines and add fourteen source lines and five comment lines, or did\nthe developer\ndo a complete rewrite, discarding all 100 original lines and\nadding 102 lines of all new source?  The diff option tells how\nmany lines of source were added, removed, modified or stayed\nthe same, and how many lines of comments were added, removed,\nmodified or stayed the same.\n\nDifferences in blank lines are handled much more coarsely\nbecause these are stripped by cloc early on.  Unless a\nfile pair is identical, cloc will report only differences\nin absolute counts of blank lines.  In other words, one\ncan expect to see only entries for 'added' if the second\nfile has more blanks than the first, and 'removed' if the\nsituation is reversed.  The entry for 'same' will be non-zero\nonly when the two files are identical.\n\nIn addition to file pairs, one can give cloc pairs of\ndirectories, or pairs of file archives, or a file archive\nand a directory.  cloc will try to align\nfile pairs within the directories or archives and compare diffs\nfor each pair.  For example, to see what changed between\nGCC 4.4.0 and 4.5.0 one could do\n\u003cpre\u003e\ncloc --diff gcc-4.4.0.tar.bz2  gcc-4.5.0.tar.bz2\n\u003c/pre\u003e\n\nBe prepared to wait a while for the results though; the `--diff`\noption runs much more slowly than an absolute code count.\n\nTo see how cloc aligns files between the two archives, use the\n`--diff-alignment` option\n\u003cpre\u003e\ncloc --diff-alignment=align.txt gcc-4.4.0.tar.bz2  gcc-4.5.0.tar.bz2\n\u003c/pre\u003e\nto produce the file `align.txt` which shows the file pairs as well\nas files added and deleted.  The symbols `==` and `!=` before each\nfile pair indicate if the files are identical (`==`)\nor if they have different content (`!=`).\n\nHere's sample output showing the difference between the Python 2.6.6 and 2.7\nreleases:\n\u003cpre\u003e\u003ci\u003eprompt\u0026gt;\u003c/i\u003e cloc --diff Python-2.7.9.tgz Python-2.7.10.tar.xz\n    4315 text files.\n    4313 text files.s\n    2173 files ignored.\n\n4 errors:\nDiff error, exceeded timeout:  /tmp/8ToGAnB9Y1/Python-2.7.9/Mac/Modules/qt/_Qtmodule.c\nDiff error, exceeded timeout:  /tmp/M6ldvsGaoq/Python-2.7.10/Mac/Modules/qt/_Qtmodule.c\nDiff error (quoted comments?):  /tmp/8ToGAnB9Y1/Python-2.7.9/Mac/Modules/qd/qdsupport.py\nDiff error (quoted comments?):  /tmp/M6ldvsGaoq/Python-2.7.10/Mac/Modules/qd/qdsupport.py\n\nhttps://github.com/AlDanial/cloc v 1.65  T=298.59 s (0.0 files/s, 0.0 lines/s)\n-----------------------------------------------------------------------------\nLanguage                   files          blank        comment           code\n-----------------------------------------------------------------------------\nVisual Basic\n same                          2              0              1             12\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nmake\n same                         11              0            340           2952\n modified                      1              0              0              1\n added                         0              0              0              0\n removed                       0              0              0              0\ndiff\n same                          1              0             87            105\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nCSS\n same                          0              0             19            327\n modified                      1              0              0              1\n added                         0              0              0              0\n removed                       0              0              0              0\nObjective-C\n same                          7              0             61            635\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nNAnt script\n same                          2              0              0             30\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nXML\n same                          3              0              2             72\n modified                      1              0              0              1\n added                         0              0              0              1\n removed                       0              1              0              0\nWindows Resource File\n same                          3              0             56            206\n modified                      1              0              0              1\n added                         0              0              0              0\n removed                       0              0              0              0\nExpect\n same                          6              0            161            565\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nHTML\n same                         14              0             11           2344\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nvim script\n same                          1              0              7            106\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nC++\n same                          2              0             18            128\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nWindows Module Definition\n same                          7              0            187           2080\n modified                      2              0              0              0\n added                         0              0              0              1\n removed                       0              1              0              2\nProlog\n same                          1              0              0             24\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nJavascript\n same                          3              0             49            229\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nAssembly\n same                         51              0           6794          12298\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nBourne Shell\n same                         41              0           7698          45024\n modified                      1              0              0              3\n added                         0             13              2             64\n removed                       0              0              0              0\nDOS Batch\n same                         29              0            107            494\n modified                      1              0              0              9\n added                         0              1              0              3\n removed                       0              0              0              0\nMSBuild script\n same                         77              0              3          38910\n modified                      0              0              0              0\n added                         0              0              0              0\n removed                       0              0              0              0\nPython\n same                       1947              0         109012         430335\n modified                    192              0             94            950\n added                         2            323            283           2532\n removed                       2             55             58            646\nm4\n same                         18              0            191          15352\n modified                      1              0              0              2\n added                         1             31              0            205\n removed                       0              0              0              0\nC\n same                        505              0          37439         347837\n modified                     45              0             13            218\n added                         0             90             33            795\n removed                       0              9              2            148\nC/C++ Header\n same                        255              0          10361          66635\n modified                      5              0              5              7\n added                         0              1              3            300\n removed                       0              0              0              0\n---------------------------------------------------------------------\nSUM:\n same                       2986              0         172604         966700\n modified                    251              0            112           1193\n added                         3            459            321           3901\n removed                       2             66             60            796\n---------------------------------------------------------------------\n\u003c/pre\u003e\nA pair of errors occurred.\nThe first pair was caused by timing out when computing diffs of the file\n`Python-X/Mac/Modules/qt/_Qtmodule.c` in each Python version.\nThis file has \u003e 26,000 lines of C code and takes more than\n10 seconds--the default maximum duration for diff'ing a\nsingle file--on my slow computer.  (Note:  this refers to\nperforming differences with\nthe `sdiff()` function in the Perl `Algorithm::Diff` module,\nnot the command line `diff` utility.)  This error can be\novercome by raising the time to, say, 20 seconds\nwith `--diff-timeout 20`.\n\nThe second error is more problematic.  The files\n`Python-X/Mac/Modules/qd/qdsupport.py`\ninclude Python docstring (text between pairs of triple quotes)\ncontaining C comments.  cloc treats docstrings as comments and handles them\nby first converting them to C comments, then using the C comment removing\nregular expression.  Nested C comments yield erroneous results however.\n\n[](1}}})\n\u003ca name=\"custom_lang\"\u003e\u003c/a\u003e []({{{1)\n##  [Create Custom Language Definitions \u0026#9650;](#___top \"click to go to top of document\")\ncloc can write its language comment definitions to a file or can read\ncomment definitions from a file, overriding the built-in definitions.\nThis can be useful when you want to use cloc to count lines of a\nlanguage not yet included, to change association of file extensions\nto languages, or to modify the way existing languages are counted.\n\nThe easiest way to create a custom language definition file is to\nmake cloc write its definitions to a file, then modify that file:\n\u003cpre\u003e\u003ci\u003eUnix\u0026gt;\u003c/i\u003e cloc --write-lang-def=my_definitions.txt\n\u003c/pre\u003e\ncreates the file `my_definitions.txt` which can be modifie","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlDanial%2Fcloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlDanial%2Fcloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlDanial%2Fcloc/lists"}