Skip to main content

sl count-lines

The sl count-lines command allows you to count the lines of code in a given directory. This information can help you determine if the workstation you're running preZero on can support code analysis.

The command will try to exclude directories that do not contain your application code directly (e.g., node_modules for Node.js or vendor for Go).

Usage

To run: sl count-lines [command options] <path-to-directory>

Command options

OptionDescription
--jsUse to indicate the project is a JavaScript application
--csharpUse to indicate the project is a C# application
--goUse to indicate the project is a Go application
--javaUse to indicate the project is a Java/Scala application
--kotlinUse to indicate the project is a Kotlin application
--phpUse to indicate the project is a PHP application
--pythonUse to indicate the project is a Python application

Sample usage

$ sl count-lines --js sample-apps/sl-angular
552 lines for 28 JavaScript files in sample-apps/sl-angular