Skip to content

Latest commit

 

History

History
84 lines (55 loc) · 2.22 KB

BUILD.md

File metadata and controls

84 lines (55 loc) · 2.22 KB

BUILD

Table of contents

3.2. Tests

About

The BUILD.md is a file to check the environment and build specifications of horusec-engine project.

Environment

Development

Horusec-Engine is the standalone SAST engine used by Horusec-CLI.

You can use it as a package by running the following command in your Golang project:

go get github.com/ZupIT/horusec-engine

Style Guide

The project uses the golangci-lint tool as a Go linter aggregator. You can perform the lint check via the make command available in each microservice:

make lint

To perform the indentation and removal of unused code automatically, just run the following command:

make fmt

The project also has a pattern of dependency imports, and the command below organizes your code in the pattern defined by the Horusec team, this command must be run in each microservice:

make fix-imports

All project files must have the license header. You can check if all files are in agreement by running the following command in project root:

make license

If it is necessary to add the license in any file, run the command below to insert it in all files that do not have it:

make license-fix

Tests

The unit tests were written with the standard package and some mock and assert snippets, we used the testify. You can run the tests using the command below:

make test

To check test coverage, run command below:

make coverage

Security

We use the latest version of Horusec-CLI to maintain the security of our source code. Through the command below, you can perform this verification in the project:

make security