cloc

Generates a Code Count that can be read by Jenkins (xml format)

This action will run cloc to generate a code count report
See https://github.com/AlDanial/cloc for more information.

cloc
Supported platforms mac
Author @johnknapprs

1 Example

  # Generate JSON report of project code count
cloc(
   exclude_dir: "build",
   source_directory: ".",
   output_directory: "pantograph/reports",
   output_type: "json"
)

Parameters

Key Description Default
binary_path Where the cloc binary lives on your system (full path including "cloc") /usr/local/bin/cloc
exclude_dir Comma separated list of directories to exclude
source_directory Starting point for Cloc analysis .
output_directory Where to put the generated report file pantograph/reports
output_type Output file type: xml, yaml, cvs, json yaml
list_each_file List each individual file in cloc report true

* = default value is dependent on the user's system


Documentation

To show the documentation in your terminal, run

pantograph action cloc

CLI

It is recommended to add the above action into your Pantfile, however sometimes you might want to run one-offs. To do so, you can run the following command from your terminal

pantograph run cloc

To pass parameters, make use of the : symbol, for example

pantograph run cloc parameter1:"value1" parameter2:"value2"

It's important to note that the CLI supports primitive types like integers, floats, booleans, and strings. Arrays can be passed as a comma delimited string (e.g. param:"1,2,3"). Hashes are not currently supported.

It is recommended to add all pantograph actions you use to your Pantfile.


Source code

This action, just like the rest of pantograph, is fully open source, view the source code on GitHub


Back to actions