Software Engineering Processes
  • General Information
  • Assignment 1 - Testing
  • Assignment 2 - CI/CD
  • Assignment 1 - Testing (resit)
  • Assignment 2 - CI/CD (resit)
  • Tools
    • Counting Lines
    • Code Coverage
    • Example: Code Instrumentation for Coverage Measurement
Powered by GitBook
On this page
  • Lizard
  • Languages Covered
  • Installation
  • Running
  1. Tools

Counting Lines

PreviousAssignment 2 - CI/CD (resit)NextCode Coverage

Last updated 11 months ago

Lizard

We recommend that you use 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

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**

Running

Navigate to the location of your clone public repository. There you can run the command

lizard

This will then recursively search through the directory and output the in the first column

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

**If on windows you get an issue about not existing on path, you can follow from stack exchange

lizard
this guide
Example Output from Lizard