Lines of Code (LoC) Measurement

Last updated: August 4, 2026

Goal: Know how Aisle counts the Lines of Code (LoC) value for a repository. Get the same value on your computer with the open-source tool scc.

The formula

LoC = Total Code
      − Code of: XML, JSON, Markdown, Plain Text, Text, CSV,
                 TOML, INI, Properties File, SVG

All values are from the Code column in the output of scc --no-min-gen. The formula removes these format groups because they are data, not code:

Format group

Type of content

XML

Markup data

JSON

Data

Markdown

Documentation

Plain Text

Text

Text

Text

CSV

Data tables

TOML

Configuration data

INI

Configuration data

Properties File

Configuration data

SVG

Image data

Note: scc gives some XML files a more precise name, for example “XML Schema” or “Report Definition Language”. These groups are not in the table. Aisle counts them as code.

How Aisle counts

When you connect a repository, Aisle clones the code. Aisle runs scc with the option --no-min-gen. This option removes minified files and machine-made files. Comment lines, blank lines, and the .gitignore content do not go into the count. Aisle applies the formula and saves the result. When you push new commits, Aisle counts again.

Steps

  1. Install scc. Use the package manager of your system, or download the tool from the scc releases page.

  2. Clone the branch that Aisle analyzes. This is usually the default branch.

    git clone --branch <branch> <repository-url>
    cd <repository>
  3. Run scc in the repository folder:

    scc --no-min-gen
    • The column Code shows the code lines for each format group. The row Total shows the sum. To get the table as a file, run scc --no-min-gen -f html > scc-report.html.

  4. Apply the formula. Subtract the Code values of the format groups in the table above from the Total value. Example: 1,200 − 150 (XML) − 50 (CSV) = 1,000.