Skip to content

Latest commit

 

History

History

cloc

2012/02/15

Included in this directory is a snapshot of the GPL Perl script cloc.pl.  This
is a source code line counting tool.  Also contained in this directory are the
files cloc.<LANGUAGE_TYPE>.in that defines specializations of the default cloc
language definitions for TriBITS software.  Adding a language definition file
directly to TriBITS aids in trying to help standardize the names of language
files a little.

To run the tool on your project, run:

   $ cd SOME_PROJECT
   $ $TRIBITS_DIR/common_tools/cloc/cloc.pl \
        --read-lang-def=<LANG_DEF_FILE> \
        .

Here, the different language definition files are:

   $TRIBITS_DIR/common_tools/cloc/cloc.core-languages.in
   $TRIBITS_DIR/common_tools/cloc/cloc.script-languages.in

As shortcuts, one can analyze core language code with:

  $TRIBITS_DIR/common_tools/cloc/cloc-core-languages.sh .

or scripting language code with:

  $TRIBITS_DIR/common_tools/cloc/cloc-script-languages.sh .

Different TriBITS projects can copy these language definition files and define
their own language standards.  However, for the purposes of TriBITS meta build
across projects, it would be beneficial if all TriBITS projects could use a
single standard for language file extensions.

This will print statistics to the screen.  See cloc.pl --help for other useful
option.