Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebasing #1

Merged
merged 65 commits into from
Jun 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
ac1c029
Merge pull request #681 from cdahlheimer/master
AlDanial Sep 28, 2022
a47f7ae
unit test for Circom #681
AlDanial Sep 28, 2022
15504ab
Merge pull request #683 from cdahlheimer/master
AlDanial Oct 1, 2022
04c857e
unit tests for Cairo, #682
AlDanial Oct 1, 2022
9a5ecbb
link to Include Security YouTube video
AlDanial Oct 5, 2022
4aa0eec
add support for P4, #684
AlDanial Oct 5, 2022
19a50b7
Add Win32::LongPath to support long paths on Windows
RyanMcC Oct 14, 2022
9e8dbc6
unique sdir, categorized in make_file_list() w/diff, #687
AlDanial Oct 18, 2022
065bc65
add support for OpenSCAD, #688
AlDanial Oct 26, 2022
bb9ab5c
fix bad sync, make_file_list() args
AlDanial Oct 26, 2022
569030b
Merge branch 'win32-long-path-support' of https://github.com/RyanMcC/…
AlDanial Oct 31, 2022
d738795
Merge 'RyanMcC-win32-long-path-support' #686
AlDanial Oct 31, 2022
a37405a
sync #686 to Unix version
AlDanial Oct 31, 2022
e59d711
Add --diff-list-files option
RyanMcC Nov 3, 2022
9ef9921
Add --diff-list-files to load_from_config_file
RyanMcC Nov 3, 2022
08ede2e
Merge pull request #692 from RyanMcC/diff-list-files
AlDanial Nov 5, 2022
4a14338
add unit test for --diff-list-files, #692
AlDanial Nov 5, 2022
83d8a82
add support for Containerfile, #693
AlDanial Nov 15, 2022
4f40489
Add support for Pest grammer files
dffdff2423 Nov 24, 2022
d654ac4
Merge pull request #695 from dffdff2423/pest
AlDanial Nov 27, 2022
57c8ec2
add support for Pony, #697
AlDanial Dec 4, 2022
653924b
produce empty JSON or XML results if nothing counted, #698
AlDanial Dec 12, 2022
74c8a0d
Remove comments inside OCaml strings
hackedy Dec 14, 2022
7852da0
Merge pull request #701 from hackedy/master
AlDanial Dec 16, 2022
7c4a3a4
test case for comments in OCaml strings, #701
AlDanial Dec 16, 2022
cb03f19
v1.96
AlDanial Dec 18, 2022
8617196
note 1.96.1 exe for Win; start v1.97; #704
AlDanial Jan 11, 2023
ab0e214
undo #679 to restore functionality, #703
AlDanial Jan 13, 2023
2328ff9
Fix incorrect parsing of config file
tonygoold Jan 13, 2023
dbe2369
Merge pull request #706 from tonygoold/master
AlDanial Jan 14, 2023
5b3243b
add support for Jai, #707
AlDanial Jan 21, 2023
626377b
Add option for file count only
cosad3s Jan 23, 2023
306dd7b
Merge pull request #708 from cosad3s/master
AlDanial Jan 28, 2023
7eac0fe
test case for --only-count-files, #708
AlDanial Jan 28, 2023
6f8b450
add support for Constraint Grammar, #709
AlDanial Feb 2, 2023
65fcc58
fix --diff-list-file with unknown listed file, #710
AlDanial Feb 6, 2023
d103cc4
support all output file types with --hide-rate, #713
AlDanial Feb 23, 2023
3d0fdea
resolve nondeterministic --diff output, #712
AlDanial Feb 25, 2023
4e041a6
on Windows: convert command line given path separators #715
AlDanial Mar 5, 2023
84308af
nondeterministic --diff, follow-up for Windows, #716
AlDanial Mar 5, 2023
271cf62
more git + PowerShell + path separator fixes, #715
AlDanial Mar 12, 2023
34ad46a
support linker script
LingkKang Mar 14, 2023
24fbf72
Merge pull request #717 from LingkKang/master
AlDanial Mar 15, 2023
74b243d
downloads badge
AlDanial Mar 15, 2023
932be05
downloads badge, attempt 2
AlDanial Mar 15, 2023
1208b64
fix a typo
disce-omnes Apr 9, 2023
0dc14af
fix typos
disce-omnes Apr 9, 2023
7c1c808
Merge pull request #718 from disce-omnes/fix-typos
AlDanial Apr 10, 2023
215257e
new switch --include-content=<regex>, #720
AlDanial Apr 18, 2023
47c66aa
Merge branch 'master', #718
AlDanial Apr 18, 2023
e33f42e
add support for NetLogo, #721
AlDanial Apr 18, 2023
19af9db
first cut at linguist- in .gitattributes, #722
AlDanial Apr 22, 2023
7088f28
add support for Hare, #723
AlDanial May 5, 2023
78f85f8
set --quiet when STDOUT isn't a terminal, #725
AlDanial May 19, 2023
ea192f1
replace Text::Glob with my own glob2regex(), #722
AlDanial May 26, 2023
a611243
additive --not-match-f, --not-match-d, #722
AlDanial May 27, 2023
b793135
additive --not-match-f, --not-match-d, #724
AlDanial May 27, 2023
b7ef7ab
correct issue number in last commit
AlDanial May 27, 2023
52f7870
add support for Asymptote
AlDanial May 27, 2023
f4bf0ce
uncomment active blocks
AlDanial May 28, 2023
4f0bcd7
results file for first test in #722
AlDanial May 28, 2023
fb17f19
point to correct results file
AlDanial May 28, 2023
84706e3
missing input files for additive --not-match-f test
AlDanial May 28, 2023
53b258f
Fix typos
szepeviktor Jun 8, 2023
1cbf6c1
Merge pull request #729 from szepeviktor/fix-typos
AlDanial Jun 10, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ FROM base AS final

WORKDIR /tmp

CMD ["/usr/src/cloc", "--help"]
ENTRYPOINT ["/usr/src/cloc"]
CMD ["--help"]
42 changes: 35 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
* * *
cloc counts blank lines, comment lines, and physical lines of source code in many programming languages.

Latest release: v1.94 (July 4, 2022)
Latest release: v1.96 (Dec. 18, 2022)

<a href="https://github.com/AlDanial/cloc/graphs/contributors" alt="Contributors">
<img src="https://img.shields.io/github/contributors/AlDanial/cloc" /></a>
<a href="https://zenodo.org/badge/latestdoi/42029482">
<img src="https://zenodo.org/badge/42029482.svg" alt="DOI"></a>
<img src="https://img.shields.io/badge/Maintained%3F-yes-green.svg>" />
<img src="https://img.shields.io/github/downloads/AlDanial/cloc/total.svg">

cloc moved to GitHub in September 2015 after being hosted
at http://cloc.sourceforge.net/ since August 2006.
Expand Down Expand Up @@ -64,10 +64,18 @@ Step 3: Invoke cloc to count your source files, directories, archives,
or git commits.
The executable name differs depending on whether you use the
development source version (`cloc`), source for a
released version (`cloc-1.94.pl`) or a Windows executable
(`cloc-1.94.exe`). On this page, `cloc` is the generic term
released version (`cloc-1.96.pl`) or a Windows executable
(`cloc-1.96.1.exe`).
(2023-01-10: a special
[1.96.1 release](https://github.com/AlDanial/cloc/releases/tag/v1.96.1) of cloc was made to update the Windows executable to use the
``Win32::LongPath`` module.)
On this page, `cloc` is the generic term
used to refer to any of these.

[Include Security](https://www.youtube.com/user/IncludeSecurity) has a
[YouTube video](https://www.youtube.com/watch?v=eRLTkDMsCqs)
showing the steps in action.

**a file**
<pre>
prompt> cloc hello.c
Expand Down Expand Up @@ -424,6 +432,12 @@ executable and also check sites such
https://www.virustotal.com/ .
The entries for recent versions are:

cloc-1.96.1.exe:
https://www.virustotal.com/gui/file/00b1c9dbbfb920dabd374418e1b86d2c24b8cd2b8705aeb956dee910d0d75d45?nocache=1

cloc-1.96.exe:
https://www.virustotal.com/gui/file/54bf5f46fbaba7949c4eb2d4837b03c774c0ba587448a5bad9b8efc0222b1583?nocache=1

cloc-1.94.exe:
https://www.virustotal.com/gui/file/b48a6002fb75fa66ec5d0c05a5c4d51f2ad22b5b025b7eb4e3945d18419c0952?nocache=1

Expand Down Expand Up @@ -503,7 +517,8 @@ C:> cpan -i Digest::MD5
C:> cpan -i Regexp::Common
C:> cpan -i Algorithm::Diff
C:> cpan -i PAR::Packer
C:> pp -M Digest::MD5 -c -x -o cloc-1.94.exe cloc-1.94.pl
C:> cpan -i Win32::LongPath
C:> pp -M Win32::LongPath -M Encode::Unicode -M Digest::MD5 -c -x -o cloc-1.96.exe cloc-1.96.pl
</pre>

A variation on the instructions above is if you installed the portable
Expand Down Expand Up @@ -1055,9 +1070,12 @@ C# (cs)
C# Designer (designer.cs)
C++ (C, c++, cc, CPP, cpp, cxx, h++, inl, ipp, pcc, tcc, tpp)
C/C++ Header (H, h, hh, hpp, hxx)
Cairo (cairo)
Cake Build Script (cake)
Carbon (carbon)
CCS (ccs)
Chapel (chpl)
Circom (circom)
Clean (dcl, icl)
Clojure (boot, cl2, clj, cljs.hl, cljscm, cljx, hic, riemann.config)
ClojureC (cljc)
Expand All @@ -1067,6 +1085,7 @@ COBOL (CBL, cbl, ccp, COB, cob, cobol, cpy)
CoffeeScript (_coffee, cakefile, cjsx, coffee, iced)
ColdFusion (cfm, cfml)
ColdFusion CFScript (cfc)
Containerfile (Containerfile)
Coq (v)
Crystal (cr)
CSON (cson)
Expand Down Expand Up @@ -1134,6 +1153,7 @@ Haskell (hs, hsc, lhs)
Haxe (hx, hxsl)
HCL (hcl, nomad, tf, tfvars)
HLSL (cg, cginc, fxh, hlsl, hlsli, shader)
HolyC (HC)
Hoon (hoon)
HTML (htm, html, html.hl, xht)
HTML EEx (heex)
Expand All @@ -1156,15 +1176,16 @@ JSX (jsx)
Julia (jl)
Juniper Junos (junos)
Jupyter Notebook (ipynb)
kvlang (kv)
Kermit (ksc)
Korn Shell (ksh)
Kotlin (kt, ktm, kts)
kvlang (kv)
Lean (hlean, lean)
Lem (lem)
LESS (less)
lex (l, lex)
LFE (lfe)
Linker Script (ld)
liquid (liquid)
Lisp (asd, el, lisp, lsp, cl, jl)
Literate Idris (lidr)
Expand Down Expand Up @@ -1193,28 +1214,33 @@ NASTRAN DMAP (dmap)
Nemerle (n)
Nim (nim, nim.cfg, nimble, nimrod, nims)
Nix (nix)
Nunjucks (njk)
Objective-C (m)
Objective-C++ (mm)
OCaml (eliom, eliomi, ml, ml4, mli, mll, mly)
Odin (odin)
OpenCL (cl)
OpenSCAD (scad)
Oracle Forms (fmt)
Oracle PL/SQL (bod, fnc, prc, spc, trg)
Oracle Reports (rex)
P4 (p4)
Pascal (dpr, lpr, p, pas, pascal)
Pascal/Puppet (pp)
Patran Command Language (pcl, ses)
PEG (peg)
peg.js (pegjs)
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)
Pig Latin (pig)
PL/I (pl1)
PL/M (lit, plm)
PlantUML (puml)
PO File (po)
Pony (pony)
PowerBuilder (pbt, sra, srf, srm, srs, sru, srw)
PowerShell (ps1, psd1, psm1)
ProGuard (pro)
Expand Down Expand Up @@ -1277,6 +1303,7 @@ Swift (swift)
SWIG (i)
TableGen (td)
Tcl/Tk (itk, tcl, tk)
TEAL (teal)
Teamcenter met (met)
Teamcenter mth (mth)
TeX (aux, bbx, bib, bst, cbx, dtx, ins, lbx, ltx, mkii, mkiv, mkvi, sty, tex, cls)
Expand Down Expand Up @@ -1310,6 +1337,7 @@ Visualforce Page (page)
Vuejs Component (vue)
Web Services Description (wsdl)
WebAssembly (wast, wat)
WGSL (wgsl)
Windows Message File (mc)
Windows Module Definition (def)
Windows Resource File (rc, rc2)
Expand Down Expand Up @@ -3062,7 +3090,7 @@ provided the
[Serbo-Croatian](http://science.webhostinggeeks.com/cloc)
translation.

Gill Ajoft of [Ajoft Softwares](http://www.ajoft.com)
Gill Ajoft of [Ajoft Software](http://www.ajoft.com)
provided the
[Bulgarian](http://www.ajoft.com/wpaper/aj-cloc.html)
translation.
Expand Down
43 changes: 38 additions & 5 deletions Unix/NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
Release Notes for cloc version 1.96
https://github.com/AlDanial/cloc
Dec. 18, 2022

New Languages and File Types:
o Cairo
o Carbon
o Circom
o Containerfile
o HolyC
o kvlang
o Nunjucks
o OpenSCAD
o P4
o Pest
o Pony
o TEAL
o WGSL

Updates:
o New switch --diff-list-files to run diff given two list
files.
o Handle comments embedded in OCaml strings.
o Write empty JSON and XML structures if the inputs yield zero
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
and --out.
o Resolve internal file handle conflict when running --diff with
--sdir or --categorized.

============================================================================
Release Notes for cloc version 1.94
https://github.com/AlDanial/cloc
July 4, 2022
Expand Down Expand Up @@ -263,7 +296,7 @@ Updates:
logic.
o Improve Perl v. Prolog identification.
o New switch --docstring-as-code to count Python docstrings as code.
o Partial support fot Lua nested comments.
o Partial support for Lua nested comments.
o Renamed Skylark to Starlark.
o Modified Java filter to try to handle embedded comments better.
o Recognize groovy as one of the #! languages.
Expand All @@ -283,7 +316,7 @@ Updates:
https://github.com/AlDanial/cloc
Oct. 5, 2018

This is a bug-fix release to solve mis-handling of git inputs for
This is a bug-fix release to solve miss-handling of git inputs for
straight counts in 1.78 (--git --diff works ok in 1.78),
https://github.com/AlDanial/cloc/issues/328.

Expand Down Expand Up @@ -438,10 +471,10 @@ Updates:
on older versions of Perl on Windows).
o Put timeout around Regexp::Common regex evaluation to prevent
hangs on unbalanced comment markers within huge strings (issue 206).
o Fix Pascal regex wiht '{' for Perl version >= 5.26 (issue 209)
o Fix Pascal regex with '{' for Perl version >= 5.26 (issue 209)
and '(*', '*)' comment matching (issue 212).
o Rename Antlr to ANTLR Grammar.
o Add .g4 extension fo ANTLR Grammar.
o Add .g4 extension for ANTLR Grammar.
o Replace soon-to-be deprecated File::Glob::glob() with
File::Glob::bsd_glob() (issue 214).
o Revert from charset=iso-8859-1 to charset=utf-8 on undocumented
Expand Down Expand Up @@ -1180,7 +1213,7 @@ Bug Fixes:
IDL: Include .pro as a recognized file extension.

--3:
o Correct XSLT syle when running with --3.
o Correct XSLT style when running with --3.

--diff:
o Implemented YAML output option.
Expand Down
Loading