diff --git a/README.md b/README.md index ba005741..64579cae 100644 --- a/README.md +++ b/README.md @@ -1020,18 +1020,21 @@ Ada (ada, adb, ads, pad) ADSO/IDSM (adso) Agda (agda, lagda) AMPLE (ample, dofile, startup) +AnsProlog (lp) Ant (build.xml, build.xml) ANTLR Grammar (g, g4) Apex Class (cls) Apex Trigger (trigger) APL (apl, apla, aplc, aplf, apli, apln, aplo, dyalog, dyapp, mipage) +AppleScript (applescript) Arduino Sketch (ino, pde) +ArkTs (ets) AsciiDoc (adoc, asciidoc) ASP (asa, ashx, asp, axd) ASP.NET (asax, ascx, asmx, aspx, master, sitemap, webinfo) -AnsProlog (ASP/clingo) (lp) AspectJ (aj) Assembly (a51, asm, nasm, S, s) +Astro (astro) Asymptote (asy) AutoHotkey (ahk, ahkl) awk (auk, awk, gawk, mawk, nawk) @@ -1076,6 +1079,7 @@ Cucumber (feature) CUDA (cu, cuh) Cython (pxd, pxi, pyx) D (d) +Dafny (dfy) DAL (da) Dart (dart) Delphi Form (dfm) @@ -1119,7 +1123,7 @@ Gencat NLS (msg) Glade (glade, ui) Gleam (gleam) GLSL (comp, fp, frag, frg, fsh, fshader, geo, geom, glsl, glslv, gshader, tesc, tese, vert, vrx, vsh, vshader) -Go (go) +Go (go, ʕ◔ϖ◔ʔ) Godot Resource (tres) Godot Scene (tscn) Godot Shaders (gdshader) @@ -1147,6 +1151,7 @@ INI (buildozer.spec, editorconfig, ini, lektorproject, pr InstallShield (ism) IPL (ipl) Jai (jai) +Janet (janet) Java (java) JavaScript (_js, bones, cjs, es6, jake, jakefile, js, jsb, jscad, jsfl, jsm, jss, mjs, njs, pac, sjs, ssjs, xsjs, xsjslib) JavaServer Faces (jsf) @@ -1218,19 +1223,21 @@ peggy (peggy) Perl (ack, al, cpanfile, makefile.pl, perl, ph, plh, plx, pm, psgi, rexfile, pl, p6) Pest (pest) PHP (aw, ctp, phakefile, php, php3, php4, php5, php_cs, php_cs.dist, phps, phpt, phtml) -PHP/Pascal (inc) +PHP/Pascal/Fortran (inc) Pig Latin (pig) PL/I (pl1) PL/M (lit, plm) -PlantUML (iuml, pu, puml, plantuml, wsd) +PlantUML (iuml, plantuml, pu, puml, wsd) PO File (po) Pony (pony) PowerBuilder (pbt, sra, srf, srm, srs, sru, srw) PowerShell (ps1, psd1, psm1) +Prisma Schema (prisma) ProGuard (pro) Prolog (P, prolog, yap, pl, p6, pro) Properties (properties) Protocol Buffers (proto) +PRQL (prql) Pug (jade, pug) PureScript (purs) Python (buck, build.bazel, gclient, gyp, gypi, lmi, py, py3, pyde, pyi, pyp, pyt, pyw, sconscript, sconstruct, snakefile, tac, workspace, wscript, wsgi, xpy) @@ -1266,8 +1273,10 @@ SKILL (il) SKILL++ (ils) Slice (ice) Slim (slim) +Slint (slint) Smalltalk (st, cs) Smarty (smarty, tpl) +Snakemake (rules, smk) Softbridge Basic (SBL, sbl) Solidity (sol) SparForte (sp) @@ -1295,12 +1304,13 @@ Text (text, txt) Thrift (thrift) TITAN Project File Information (tpd) Titanium Style Sheet (tss) +TLA+ (tla) TNSDL (cii, cin, in1, in2, in3, in4, inf, interface, rou, sdl, sdt, spd, ssc, sst) TOML (toml) tspeg (jspeg, tspeg) TTCN (ttcn, ttcn2, ttcn3, ttcnpp) Twig (twig) -TypeScript (tsx, ts) +TypeScript (mts, tsx, ts) Typst (typ) Umka (um) Unity-Prefab (mat, prefab) @@ -1346,7 +1356,6 @@ yacc (y, yacc) YAML (clang-format, clang-tidy, gemrc, glide.lock, mir, reek, rviz, sublime-syntax, syntax, yaml, yaml-tmlanguage, yml, yml.mysql) Zig (zig) zsh (zsh) -Slint (slint) The above list can be customized by reading language definitions from a diff --git a/Unix/NEWS b/Unix/NEWS index 7afd14d7..2bb2c606 100644 --- a/Unix/NEWS +++ b/Unix/NEWS @@ -1,3 +1,59 @@ + Release Notes for cloc version 2.00 + https://github.com/AlDanial/cloc + Feb. 17, 2024 + + + ** Note: There are no breaking changes between the ** + ** 1.xx versions and this 2.00 release. ** + + +New Languages and File Types: + o AnsProlog + o AppleScript + o ArkTs + o Astro + o Dafny + o PlusCal + o Prisma Schema + o PRQL + o Slint + o Snakemake + o TLA+ + o vyper + +Updates: + o Five new output formats with the new --fmt switch. Includes the often- + requested addition of language name with --by-file counts. + o *.o.d files are ignored + o Added .j2 as a Jinja Template extension. + o Added .mts as a TypeScript extension. + o Added .iuml, .pu. .plantuml, .wsd as as PlantUML extensions. + o Support Java block comments. + o More consistent and accurate results from --diff. + o Disambiguate .inc files among PHP, Pascal, and Fortran. + o Ignore .gitattribute files. + o Improved support for --exclude-list-file. + o Fix JSON output generator which inserted a superfluous comma. + o Recognize autogenerated C# SpecFlow files and ignore them with + --no-autogen. + o Support --list-file with --git-diff-*. + o SQL output: add foreign key 'id' to table t referencing 'id' + in the metadata table. The key value is Unix epoch seconds when + cloc was invoked. + o Support // comments in ReasonML. + o Support directories in exclusion list files; all files below the + named directories are excluded. + o Support --exclude-file-list with --git --diff. + o New switch, --strip-code, which attempts to only leave comments in + the output file. + +Bug fixes: + o More accurate counts of XML with block comments. + o More accurate counts of Java with block comments and comment markers + within strings. + o Fix improper handling of --match-d and --not-match-d. + +============================================================================ Release Notes for cloc version 1.98 https://github.com/AlDanial/cloc Aug. 19, 2023 @@ -65,7 +121,7 @@ Updates: counts. o Including Win32::LongPath to support long paths on Windows. o Better support for building and running Docker image on Windows - o Better output file names when running with --count-and-diff + o Better output file names when running with --count-and-diff and --out. o Resolve internal file handle conflict when running --diff with --sdir or --categorized. diff --git a/Unix/cloc b/Unix/cloc index b20ff37a..478ebbb9 100755 --- a/Unix/cloc +++ b/Unix/cloc @@ -29,7 +29,7 @@ # . # # 1}}} -my $VERSION = "1.99"; # odd number == beta; even number == stable +my $VERSION = "2.00"; # odd number == beta; even number == stable my $URL = "github.com/AlDanial/cloc"; # 'https://' pushes header too wide require 5.10.0; # use modules {{{1 diff --git a/Unix/cloc.1.pod b/Unix/cloc.1.pod index bd6da999..e4bf2b7a 100644 --- a/Unix/cloc.1.pod +++ b/Unix/cloc.1.pod @@ -1,6 +1,6 @@ # Copyright # -# Copyright (C) 2018-2023 Al Danial . +# Copyright (C) 2018-2024 Al Danial . # Copyright (C) 2010-2017 Jari Aalto # # License @@ -403,6 +403,14 @@ See also B<--follow-links>. Count lines streamed via I as if they came from a file named FILE. +=item B<--strip-code=EXT> + +For each file processed, write to the current directory a version of +the file which has blank and code lines removed. +The name of each stripped file is the original file name with +C<.EXT> appended to it. It is written to the current directory unless +B<--original-dir> is on. + =item B<--strip-comments=EXT> For each file processed, write to the current directory a version of @@ -724,6 +732,21 @@ the default ASCII (B = 'UTF-7'). Examples: 'UTF-16', printed with perl -MEncode -e 'print join("\n", Encode->encodings(":all")), "\n"' +=item B<--fmt=N> + +Alternate text output format where B is a number +from 1 to 5, or -1 to -5. 'total lines' means the +sum of code, comment, and blank lines. Negative +values are the same as the positive values but retain, +instead of deleting, the intermediate JSON file that +is written. The JSON file name is randomly generated +unless --out/--report-file is given. The formats are: + 1: by language (same as cloc default output) + 2: by language with an extra column for total lines + 3: by file with language + 4: by file with a total lines column + 5: by file with language and a total lines column + =item B<--hide-rate> Do not show line and file processing rates in the output diff --git a/cloc b/cloc index 1855e52a..b222bf9b 100755 --- a/cloc +++ b/cloc @@ -29,7 +29,7 @@ # . # # 1}}} -my $VERSION = "1.99"; # odd number == beta; even number == stable +my $VERSION = "2.00"; # odd number == beta; even number == stable my $URL = "github.com/AlDanial/cloc"; # 'https://' pushes header too wide require 5.10.0; # use modules {{{1