Programming

Ohcount – source code line counter and analysis library

Ohcount is a source code line counter and analysis library originally developed for Ohloh and used to generate code statistics reports.

It can examine individual source files or entire directory trees, detect the primary language family in a file, and break content down line by line into code, comments, and other elements. One of its strengths is handling files that mix languages, such as HTML documents containing embedded CSS and JavaScript.

This is free and open source software.

Key Features

  • Counts source lines in individual files or whole directory trees.
  • Detects the primary language family used by a source file.
  • Handles multiple languages within a single file.
  • Provides detailed source annotations on a line-by-line basis.
  • Can find source files by language family.
  • Includes Ruby bindings for accessing language detection features from applications.
  • Also ships with a Python wrapper, although the wrapper is currently marked unsupported.
  • Supports a large range of programming and markup languages.

Website: github.com/blackducksoftware/ohcount
Support:
Developer: blackducksoftware
License: GNU General Public License v2.0


Related Software

Alternatives to cloc
TokeiDisplays statistics about your code
sccFast accurate code counter with complexity calculations and COCOMO estimates
SLOCCountSet of tools for counting physical Source Lines of Code
goclocA compact fast cloc tool seeking inspiration from Tokei
loccountRe-implementation of David A. Wheeler’s sloccount tool in Go
locRust implementation of cloc, but it’s more than 100x faster
tcountCount your code by tokens and patterns in the syntax tree
slocSimple tool to count source lines of code written in CoffeeScript
polyglotCommand-line tool that determines project contents
enryProgramming language detector based on go-enry
LinguistAssess a repository’s languages stats with github-linguist executable
CLOCTUITUI for CLOC
pygountCount source lines of code
oclocRust command-line utility that counts lines of code
OhcountSource code line counter and analysis library
Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted