[Gambas-user] Size of Gambas projects? How to obtain it by script? too many local variables?

Christof Thalhofer chrisml at deganius.de
Fri Nov 29 07:53:24 CET 2019


Am 28.11.19 um 22:30 schrieb Jussi Lahtinen:

> This shell command will give you line count, but it gives different
> number. I guess it counts also empty lines and IDE doesn't.
> find . -type f \( -name "*.module" -o -name "*.class" \) -print0 | xargs
> -0 wc --lines

You can also use cloc (which is part of Debian) with a special
definition file for Gambas. This is able to count more than one project,
which is the case here where the whole project is realized by a couple
of Gambas projects together with some code of other languages.

> christof at tof-x230 ~/programming/gambas/deganius » cloc --read-lang-def=cloc.def ./ 
>     1535 text files.
>     1240 unique files.                                          
>      831 files ignored.
> 
> github.com/AlDanial/cloc v 1.74  T=5.07 s (142.8 files/s, 20909.5 lines/s)
> ---------------------------------------------------------------------------------------
> Language                             files          blank        comment           code
> ---------------------------------------------------------------------------------------
> Gambas3                                516          28709          10524          55730
> Elixir                                  32            252            368           1606
> TeX                                     45            311            444           1583
> PHP                                     34            141            119           1520
> Windows Module Definition                2              0              0           1432
> AMPLE                                   30             60              0            766
> Bourne Shell                            32            294            294            474
> make                                     9            155            103            439
> Markdown                                 3            110              0            169
> Bourne Again Shell                       3             28              7             59
> PO File                                  3             34             71             54
> Visualforce Component                   10              0              0             42
> DOS Batch                                4             30             14             36
> CSS                                      1              7              0             17
> ---------------------------------------------------------------------------------------
> SUM:                                   724          30131          11944          63927
> ---------------------------------------------------------------------------------------


I attach cloc.def.


Alles Gute

Christof Thalhofer

-- 
Dies ist keine Signatur
-------------- next part --------------
Gambas3
    filter remove_matches ^\s*'
    extension class
    extension module
    3rd_gen_scale 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20191129/cd589325/attachment.sig>


More information about the User mailing list