Skip to content

ssgeos/countlines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

countlines

A Free Pascal tool to count lines in Lazarus/Delphi projects (*.pas, *.pp, *.dpr, *.lfm). Outputs non-empty, code, comment, and empty line counts to console and CSV, designed for efficient code analysis.

Features

  • Counts lines in source files (*.pas, *.pp, .dpr) and form files (.lfm).
  • Metrics for source files: Non-empty, Code (including code with trailing // comments), Comment (non-empty minus code), Empty.
  • Metrics for form files: Total lines, Empty lines.
  • Supports { ... }, (* ... *), and // comments.
  • Warns on unclosed comment blocks.
  • Ignores nested/malformed comments (bad practice).
  • Outputs results to console and line_counts.csv in target directory.
  • Safeguard for empty directories to prevent division-by-zero errors.

License

FPC modified LGPL Version 2 (https://wiki.lazarus.freepascal.org/FPC_modified_LGPL)

Usage

fpc countlines.pas
./countlines [directory]

About

A Free Pascal tool to count lines in Lazarus/Delphi projects (*.pas, *.pp, *.dpr, *.lfm) with console and CSV output.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages