{"id":19082996,"url":"https://github.com/deep5050/comment-to-code-ratio-action","last_synced_at":"2025-10-06T21:04:32.536Z","repository":{"id":56027765,"uuid":"316473616","full_name":"deep5050/comment-to-code-ratio-action","owner":"deep5050","description":"GitHub action to measure comment-code ratio for your entire project on every push :tada:","archived":false,"fork":false,"pushed_at":"2021-04-21T06:24:16.000Z","size":312,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-03T03:34:25.744Z","etag":null,"topics":["cloc","code-analysis","code-quality","code-quality-analyzer","comments-system","github-actions","line-of-code","loc","reporting","reporting-tool"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deep5050.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-27T10:43:45.000Z","updated_at":"2023-02-13T17:08:41.000Z","dependencies_parsed_at":"2023-01-11T17:23:19.347Z","dependency_job_id":null,"html_url":"https://github.com/deep5050/comment-to-code-ratio-action","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":"0.10526315789473684","last_synced_commit":"0daf8157c002ee5766126a895261936faca4ec1a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep5050%2Fcomment-to-code-ratio-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep5050%2Fcomment-to-code-ratio-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep5050%2Fcomment-to-code-ratio-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deep5050%2Fcomment-to-code-ratio-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deep5050","download_url":"https://codeload.github.com/deep5050/comment-to-code-ratio-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223780084,"owners_count":17201286,"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","code-analysis","code-quality","code-quality-analyzer","comments-system","github-actions","line-of-code","loc","reporting","reporting-tool"],"created_at":"2024-11-09T02:45:33.699Z","updated_at":"2025-10-06T21:04:27.490Z","avatar_url":"https://github.com/deep5050.png","language":"JavaScript","funding_links":["https://github.com/sponsors/deep5050","https://paypal.me/deep5050"],"categories":[],"sub_categories":[],"readme":"\n\u003cdiv align=center\u003e\n\u003cp align=center\u003e\n\u003cimg align=center src=\"./logo.svg\"\u003e\n\u003cp align=center\u003eGitHub Action To Measure Comment-Code Ratio For Your Entire Project On Every Push\u003c/p\u003e\n\u003c/h4\u003e\n\n\u003c/p\u003e\n\u003cp align=center\u003e\n\u003ca href=\"https://github.com/deep5050/comment-to-code-ratio-action/blob/master/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/github/license/deep5050/comment-to-code-ratio-action?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/deep5050/comment-to-code-ratio-action/network/members\"\u003e\u003cimg alt=\"Forks\" src=\"https://img.shields.io/github/forks/deep5050/comment-to-code-ratio-action?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/deep5050/comment-to-code-ratio-action/stargazers\"\u003e\u003cimg alt=\"Stars\" src=\"https://img.shields.io/github/stars/deep5050/comment-to-code-ratio-action?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/deep5050/comment-to-code-ratio-action/issues\"\u003e\u003cimg alt=\"Github Issues\" src=\"https://img.shields.io/github/issues-raw/deep5050/comment-to-code-ratio-action?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/deep5050/comment-to-code-ratio-action/pulls\"\u003e\u003cimg alt=\"Github open PRs\" src=\"https://img.shields.io/github/issues-pr-raw/deep5050/comment-to-code-ratio-action?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/deep5050/comment-to-code-ratio-action/releases\"\u003e\u003cimg alt=\"Release Version\" src=\"https://img.shields.io/github/v/release/deep5050/comment-to-code-ratio-action?style=for-the-badge\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/deep5050/comment-to-code-ratio-action/actions?query=workflow:test\"\u003e\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/workflow/status/deep5050/comment-to-code-ratio-action/test?label=test\u0026logo=github\u0026style=for-the-badge\"/\u003e\u003c/a\u003e\n\n\u003c/p\u003e\n\n\n\u003c/div\u003e\n\n## About\nComments should be very rare and valuable, almost always expressing the \"why\" and never the \"how\" (the exception being when the how is complex and not easily discernible from the code).\n\nEvery comment is a hint that you may need to refactor to make the code's intent clearer. Every comment risks becoming out of date as soon as it's written.\n\n\nSo I implement this action which mesaures the comment to code ratio for your entire project and comment on a fixed issue on every push to the codebase :smile: .\nOptionally you can save the report to your repo.\n\n## Usage guide\n1. Open a blank issue ( you might wanna pin acnd close this too )\n2. Put the issue number in the workflow file\n3. Configure the options under the workflow file ( if needed )\n\n\n\n## [See demo](https://github.com/deep5050/comment-to-code-ratio-action/issues/1)\n\n![demo](./demo.png)\n\n\n## Some report structures\n\n\nLanguage|files|blank %|comment %|code\n:-------|-------:|-------:|-------:|-------:\nTypeScript|188|4.15|25.66|84558\nJavaScript|121|9.73|16.44|17484\nMarkdown|35|20.87|0.00|4417\nJSON|26|0.00|0.00|2474\nXML|5|0.00|0.00|829\nYAML|3|12.73|0.00|48\n--------|--------|--------|--------|--------\nSUM:|378|5.54|22.73|109810\n\nOR\n\nFile|blank %|comment %|code\n:-------|-------:|-------:|-------:\n./index.js|26.67|0.00|33\n./temp.js|26.92|0.00|19\n./help.js|23.81|0.00|16\n./report.md|9.09|0.00|10\n--------|--------|--------|--------\nSUM:|24.27|0.00|78\n\n## How to install\n\n```yaml\nname: \"c2c\"\non: [push]\n\njobs:\n  test:\n    name: setup environment\n    runs-on: ubuntu-latest\n    steps:\n      - name: checkout\n        uses: actions/checkout@v2\n        \n      - name: install cloc\n        uses: actions/setup-node@v1\n        with:\n          node-version: '12'\n      - run: sudo npm install cloc -g\n        \n      - name: comment to code ratio\n        uses: deep5050/comment-to-code-ratio-action@main\n        with:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          issue_number: 1\n          options: '--quiet ./ --hide-rate --git --unix --md --out=report.md --timeout=20 --by-percent=cmb --by-file --exclude-dir=node_modules --exclude-lang=JSON,XML'\n\n```\n\n\u003e You might wanna change the options as per your needs.\n\n### Tips\n\nTo save the report file locally, add the below code snippet add the end of the workflow file\n\n```yaml\n      - name: publish report\n        uses: mikeal/publish-to-github-action@master\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          BRANCH_NAME: 'main' # your branch name goes here\n\n```\n\n## Options\n\nThis action uses the [cloc](https://github.com/AlDanial/cloc) tool to generate the report. Here is the usgae guide\nfor the tool for a quick reference.\n\n\n```text\n\ngitpod /workspace/comment-to-code-ratio-action $ cloc --help\n\nUsage: cloc [options] \u003cfile(s)/dir(s)/git hash(es)\u003e | \u003cset 1\u003e \u003cset 2\u003e | \u003creport files\u003e\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=\u003ccmd\u003e      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 \u003ccmd\u003e to extract binary archive files (e.g.:\n                             .tar.gz, .zip, .Z).  Use the literal '\u003eFILE\u003c' 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 \u003eFILE\u003c | tar xf -'\n                             or, if you have GNU tar,\n                               --extract-with='tar zxf \u003eFILE\u003c'\n                             and on Windows use, for example:\n                               --extract-with=\"\\\"c:\\Program Files\\WinZip\\WinZip32.exe\\\" -e -o \u003eFILE\u003c .\"\n                             (if WinZip is installed there).\n   --list-file=\u003cfile\u003e        Take the list of file and/or directory names to\n                             process from \u003cfile\u003e, 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 \u003cfile\u003e\n                             to - to read file names from a STDIN pipe.\n                             See also --exclude-list-file.\n   --diff-list-file=\u003cfile\u003e   Take the pairs of file names to be diff'ed from\n                             \u003cfile\u003e, 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=\u003cVCS\u003e               Invoke a system call to \u003cVCS\u003e to obtain a list of\n                             files to work on.  If \u003cVCS\u003e 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 \u003cVCS\u003e 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 \u003cVCS\u003e 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 \u003cVCS\u003e.  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 \u003cVCS\u003e 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 \u003cfile\u003e           Read command line switches from \u003cfile\u003e instead of\n                             the default location of /home/gitpod/.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 \u003cset1\u003e \u003cset2\u003e\n                             First perform direct code counts of source file(s)\n                             of \u003cset1\u003e and \u003cset2\u003e 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 \u003cset1\u003e \u003cset2\u003e      Compute differences in code and comments between\n                             source file(s) of \u003cset1\u003e and \u003cset2\u003e.  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 \u003cN\u003e        Ignore files which take more than \u003cN\u003e seconds\n                             to process.  Default is 10 seconds.  Setting \u003cN\u003e\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=\u003clang\u003e[,\u003cext\u003e]\n                             Process all files that have a \u003cext\u003e extension\n                             with the counter for language \u003clang\u003e.  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 \u003cext\u003e is omitted, every file will be counted\n                             with the \u003clang\u003e counter.  This option can be\n                             specified multiple times (but that is only\n                             useful when \u003cext\u003e is given each time).\n                             See also --script-lang, --lang-no-ext.\n   --force-lang-def=\u003cfile\u003e   Load language processing filters from \u003cfile\u003e,\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=\u003clang\u003e      Count files without extensions using the \u003clang\u003e\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=\u003cMB\u003e      Skip files larger than \u003cMB\u003e megabytes when\n                             traversing directories.  By default, \u003cMB\u003e=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=\u003cfile\u003e    Load new language processing filters from \u003cfile\u003e\n                             and merge them with those already known to cloc.\n                             If \u003cfile\u003e 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=\u003clang\u003e,\u003cs\u003e  Process all files that invoke \u003cs\u003e as a #!\n                             scripting language with the counter for language\n                             \u003clang\u003e.  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, \u003cs\u003e,\n                             must have the right case.  This option can be\n                             specified multiple times.  See also --force-lang,\n                             --lang-no-ext.\n   --sdir=\u003cdir\u003e              Use \u003cdir\u003e 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 spead will decrease.\n                             See also --follow-links.\n   --stdin-name=\u003cfile\u003e       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=\u003cext\u003e    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 .\u003cext\u003e 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 \u003cN\u003e             Ignore files which take more than \u003cN\u003e 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 \u003cN\u003e 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   --exclude-content=\u003cregex\u003e Exclude files containing text that matches the given\n                             regular expression.\n   --exclude-dir=\u003cD1\u003e[,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=\u003cregex\u003e\n                             to supply a regex matching multiple subdirectories.\n   --exclude-ext=\u003cext1\u003e[,\u003cext2\u003e[...]]\n                             Do not count files having the given file name\n                             extensions.\n   --exclude-lang=\u003cL1\u003e[,L2[...]]\n                             Exclude the given comma separated languages\n                             L1, L2, L3, et cetera, from being counted.\n   --exclude-list-file=\u003cfile\u003e  Ignore files and/or directories whose names\n                             appear in \u003cfile\u003e.  \u003cfile\u003e 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=\u003cext1\u003e[,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=\u003cL1\u003e[,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=\u003cregex\u003e         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=\u003cregex\u003e     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=\u003cregex\u003e         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=\u003cregex\u003e     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=\u003cregex\u003e    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=\u003cfile\u003e      Save names of categorized files to \u003cfile\u003e.\n   --counted=\u003cfile\u003e          Save names of processed source files to \u003cfile\u003e.\n   --diff-alignment=\u003cfile\u003e   Write to \u003cfile\u003e 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=\u003clang\u003e          Print the filters used to remove comments for\n                             language \u003clang\u003e 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=\u003cfile\u003e            Save names of every file found to \u003cfile\u003e.\n   --ignored=\u003cfile\u003e          Save names of ignored files and the reason they\n                             were ignored to \u003cfile\u003e.\n   --print-filter-stages     Print processed source code before and after\n                             each filter is applied.\n   --show-ext[=\u003cext\u003e]        Print information about all known (or just the\n                             given) file extensions and exit.\n   --show-lang[=\u003clang\u003e]      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[=\u003cn\u003e]                  Verbose switch (optional numeric value).\n   -verbose[=\u003cn\u003e]            Long form of -v.\n   --version                 Print the version of this program and exit.\n   --write-lang-def=\u003cfile\u003e   Writes to \u003cfile\u003e 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=\u003cfile\u003e\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'   -\u003e # lines of code\n                                X = 'cm'  -\u003e # lines of code + comments\n                                X = 'cb'  -\u003e # lines of code + blanks\n                                X = 'cmb' -\u003e # 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=\u003cC\u003e       Use the character \u003cC\u003e as the delimiter for comma\n                             separated files instead of ,.  This switch forces\n   --file-encoding=\u003cE\u003e       Write output files using the \u003cE\u003e encoding instead of\n                             the default ASCII (\u003cE\u003e = '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-\u003eencodings(\":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=\u003cfile\u003e              Synonym for --report-file=\u003cfile\u003e.\n   --progress-rate=\u003cn\u003e       Show progress update after every \u003cn\u003e files are\n                             processed (default \u003cn\u003e=100).  Set \u003cn\u003e 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=\u003cfile\u003e      Write the results to \u003cfile\u003e instead of STDOUT.\n   --sql=\u003cfile\u003e              Write results as SQL create and insert statements\n                             which can be read by a database program such as\n                             SQLite.  If \u003cfile\u003e 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=\u003cname\u003e      Use \u003cname\u003e as the project identifier for the\n                             current run.  Only valid with the --sql option.\n   --sql-style=\u003cstyle\u003e       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=\u003cfile\u003e              Reference \u003cfile\u003e as an XSL stylesheet within\n                             the XML output.  If \u003cfile\u003e 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\n   ```\n\n\n   ## Support\n\nAll Kinds Of Supports Are Welcome :raised_hands:! The Most Basic Way To Show Your Support Is To Star :star2: The Project, Or To Raise Issues :speech_balloon: You Can Also Support This Project By [**becoming a sponsor on GitHub**](https://github.com/sponsors/deep5050) :clap: Or By Making A [**Paypal**](https://paypal.me/deep5050) Donation :)\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nDipankar Pal - dipankarpal5050@gmail.com\n\n\n\n## Related Works\n[NaughtyLust](https://github.com/deep5050/NaughtyLust) : Awesome Nautilus Scripts For Linux.\n\n[qikQR](https://github.com/deep5050/qikQR) : Minimal QR Code Generator App Made With Electron.\n\n[cppcheck-action](https://github.com/deep5050/cppcheck-action) : Check Security Flaws In Your C/C++ Codes Right From GitHub Action Workflows.\n\n[autopy-lot](https://github.com/deep5050/autopy-lot) : GitHub Action Setup To Convert Jupyter Notebooks To Python Scripts And Markdowns.\n\n\u003cdiv align=center\u003e\n\u003cp align=center\u003e\u003cimg align=center src=\"https://raw.githubusercontent.com/liyasthomas/templates/master/assets/logo.gif\" alt=\"unicorn\" width=\"400\"\u003e\n\u003c/p\u003e\n\u003cp align=center\u003eHappy Coding\u003c/p\u003e\n  \n\u003cp align=center\u003e\u003cimg align=center  src=\"https://visitor-badge.laobi.icu/badge?page_id=deep5050.comment-to-code-ratio-action\" alt=\"Visitors\"\u003e  \u003c/p\u003e\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep5050%2Fcomment-to-code-ratio-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeep5050%2Fcomment-to-code-ratio-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeep5050%2Fcomment-to-code-ratio-action/lists"}