cloc-installation

This tasks counts the lines of code of an installation. It is available in all application modes.

The task forces files that cloc identifies as sh files to be treated as bash files, using the cloc option --force-lang="Bourne Again Shell",sh. This ensures that the installation’s include and application files (without the .sh extension) are counted as bash files.

More details on cloc can be found at the Github source repository on Github.

Options

The task does not have any special options.

-h | --help        print help screen and exit

Examples

Simply running the task will count the lines of code of an installation. The following is the output of running this task on the SKB-Framework in an earlier version.

     545 text files.
     539 unique files.
     222 files ignored.

github.com/AlDanial/cloc v 1.80  T=1.00 s (376.0 files/s, 23126.0 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Bourne Again Shell              226           2618           5211          12077
HTML                              1              0              1           1635
AsciiDoc                        147            308              0           1202
XML                               1              7             21             28
Ant                               1              4              1             13
--------------------------------------------------------------------------------
SUM:                            376           2937           5234          14955
--------------------------------------------------------------------------------

The count shows the two ANT files (build file and macro file) as ANT and XML language files. All ADOC files are shown as AsciiDoc language files The HTML file is the framework’s HTML manual. The top line shows the lines of code for all bash scripts in the installation, including all tasks and .id files.

Requirements

The task requires the tool cloc being installed. The dependency is called by the same name: cloc. If cloc is not installed, the task will print an error.