Several reports in GitClear refer to the concept of a "meaningful code line change." For example, the "Code Quality" report on "line operation counts" includes only meaningful line changes.


The "Issues & Quality" tab contains a report on "Line Operation Counts," which references "meaningfully changed lines"


To qualify as a "meaningful code line change" (which we will interchangeably refer to as a "meaningfully changed line"), a line must meet certain qualifications for the line itself, its code file, and the branch/repo it resides within. On this page, we will review each.



A close cousin of this page is our visual breakdown in Lines of Code: Cutting the Noise. If your interest on this topic extends to the greatest watery depths, you may enjoy our blog post that runs down a partial list of factors that made it take so long to build GitClear in the first place.


linkCode Lines: What's meaningful?

A meaningful code line is a line whose change is recognized as one of GitClear's recognized operations. Types of lines changes that are excluded:

Addition or removal of blank lines

Changes to the white space before or after a line (i.e., " hello" is the same as " hello", even though the former has more white space before)

Lines that contain only language keywords or parenthesis/braces. For example, a line that is }) will not count. In Ruby, the end line doesn't count. GitClear currently recognizes keywords for about 50 languages

Commits with extremely large line counts (roughly 5,000-10,000 lines) or that were authored at an unrealistic speed (e.g., 1,000 lines added 10 minutes after the author's previous commit to the repo) relative to the committer's norms

The content of the line appears to be auto-generated (e.g., a line that includes multiple, long, unbroken sequences of characters and numbers)

Whether code comments are deemed "meaningful" depends on the context. By a strict definition, we treat code comments as not meaningful code, but for the sake of calculating line operation counts & documentation counts, we include comment changes since some types of documentation are provided in the form of comments.


linkCode Files: What's meaningful?

Lines are only counted as meaningful when they reside within a file that is not ignored. Users in GitClear can set up masks that ignore certain directories, files, or branches. In addition to the files that users set up to be ignored, GitClear automatically ignores certain files and directories:

Files whose extension does not correspond with one of the ~50 languages that GitClear recognizes.

Files that reside within directories that are usually auto-generated, i.e., directories that include "build" or "mocks" in their name

Commonly known build files, e.g., package-lock.json in Javascript, *.min*.js, manifest.*ml,

Other types of commonly auto-generated files


linkBranches & Repos: What's meaningful?

Lines are only considered meaningful if their commit is in a branch and repo that is relevant and unique. Factors that would cause code lines in a repo or a branch not to be included as "meaningful":

The branch was last pushed a long time ago, and never merged to the main branch

The branch was ignored by the user as their "release" branch, "stable" branch, etc

The commit is part of a git subrepo. Lines are not counted when their commit duplicates another that was made within the entity.


linkSummary / Guiding Intuition

If a human would say that the line change appears to have required effort by the committer, it will be included.