> For the complete documentation index, see [llms.txt](https://sep-vu.gitbook.io/software-engineering-processes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sep-vu.gitbook.io/software-engineering-processes/tools/counting-lines.md).

# Counting Lines

## Lizard

We recommend that you use [lizard](https://github.com/terryyin/lizard) for counting the lines of code since it supports many programming languages.

### Languages Covered

* C/C++ (works with C++14)
* Java
* C# (C Sharp)
* JavaScript (With ES6 and JSX)
* TypeScript
* Objective-C
* Swift
* Python
* Ruby
* TTCN-3
* PHP
* Scala
* GDScript
* Golang
* Lua
* Rust
* Fortran
* Kotlin
* Solidity
* Erlang

### Installation&#x20;

#### Tested on Linux and Windows

Install python 3 or have it on your computer already

Can be ran without installing by just downloading the full source code and running with `python lizard.py`

To get full features you will need to run a full install with

`pip install lizard`

\*\*Lizard for VS code only covers C++ so unless your project uses that, would recommend original install\*\*

\*\*If on windows you get an issue about not existing on path, you can follow [this guide ](https://superuser.com/a/1558227)from stack exchange&#x20;

### Running

Navigate to the location of your clone public repository. There you can run the command&#x20;

`lizard`

This will then recursively search through the directory and output the nloc[^1] in the first column

<figure><img src="https://880512439-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxxBwKZ6ACb1smNJiByOY%2Fuploads%2FaxsQL0i9wZu4gKQ1hone%2Fimage.png?alt=media&amp;token=1ed26c34-0944-4b5f-a899-d033ee97b549" alt=""><figcaption><p>Example Output from Lizard</p></figcaption></figure>

If you are looking for count from a specific language use `lizard -l {language you are interested in}`

For example if you are interested in Java you would type in your directory `lizard -l java`

[^1]: Number Lines Of Code
