Change line count to exclude whitespace and comments? #103

Open
opened 2025-12-06 22:36:30 +01:00 by Digit · 0 comments
Owner

E.g.

Instead of just

% cat fin | wc -l
721

do something like

% cat fin | sed '/^\s*$/d' | grep -Ev ^# | wc -l
590

Advantages:

  • Adds freeing feels to add more extensive comments without bloating the code line count.
  • Makes fin seem more light and tight. ;)

Disadvantages:

  • A little more fiddly
  • Breaks consistency of line counts between old versioned commits and new.
E.g. Instead of just ``` % cat fin | wc -l 721 ``` do something like ``` % cat fin | sed '/^\s*$/d' | grep -Ev ^# | wc -l 590 ``` Advantages: * Adds freeing feels to add more extensive comments without bloating the code line count. * Makes fin seem more light and tight. ;) Disadvantages: * A little more fiddly * Breaks consistency of line counts between old versioned commits and new.
Sign in to join this conversation.
No description provided.