# 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&#x26;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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sep-vu.gitbook.io/software-engineering-processes/tools/counting-lines.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
