Skip to main content

count source lines of code (SLOC) using pygments

Project description

Build Status Test coverage Code Health

pygount

Pygount is a command line tool to scan folders for source code files and count the number of source code lines in it. It is similar to tools like sloccount and cloc but uses the pygments package to analyze the source code and consequently can analyze any programming language supported by pygments.

The name is a combination of pygments and count.

Download and installation

Pygount is available from https://pypi.python.org/pypi/pygount and can be installed running:

$ pip install pygount

Usage

Simply run and specify the folder to analyze recursively, for example:

$ pygount ~/development/sometool

If you omit the folder, the current folder of your shell is used as starting point.

There are a couple of command line options, to find out more, run:

$ pygount --help

Jenkins

Pygount can produce output that can be processed by the SLOCCount plug-in for Jenkins continuous integration server.

For example:

pygount --format=cloc-xml --out cloc.xml --suffix=py --verbose

Then add a post-build action “Publish SLOCCount analysis results” and set “SLOCCount report” to “cloc.xml”.

Revision history

Version 0.0.1, 2016-07-05

  • Initial public release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pygount-0.1-py3-none-any.whl (10.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page