gocloc
« Back to VersTracker
Description:
Little fast LoC counter
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: loc metrics code-analysis developer-tools golang
Install: brew install gocloc
About:
Gocloc is a command-line tool written in Go for counting lines of code across multiple programming languages. It analyzes source code files to calculate physical lines, blank lines, and comment lines, providing a comprehensive breakdown of project metrics. The tool is designed for speed and efficiency, making it suitable for large codebases.
Key Features:
  • Multi-language support for dozens of programming languages
  • High performance due to Go implementation
  • Accurate differentiation of code, comments, and blank lines
  • Support for .gitignore and .goclocignore files
  • JSON output format for easy integration
Use Cases:
  • Auditing project complexity and size during code reviews
  • Generating code metrics for documentation or reports
  • Comparing codebase density across different languages or versions
Alternatives:
  • cloc – Gocloc is significantly faster but cloc has broader language support and more configuration options
  • tokei – Both are fast Rust/Go tools; tokei is written in Rust and often cited as slightly faster with a different output style
Version History
Detected Version Rev Change Commit
Sep 11, 2025 11:50am 0 VERSION_BUMP ea3f4b5a