1. About
2. Environment
3. Development
3.1. Install and Run
3.2. Style Guide
3.3. Tests
3.3.1 E2E
3.3.2 Unitary Tests
3.4 Security
4. Production
The BUILD.md is a file to check the environment and build specifications of horusec-cli project.
Use a command-line interface (CLI) of your choice to run the following commands to download and install the dependencies.
From the root of the project, run the command below to download the dependencies:
go mod download
The command below build the Horusec cli for development:
make build-dev
After build successful you can execute running:
./horusec
Or on Windows:
horusec
There is a pattern for the source code and the golangci-lint tool is used as an aggregator to the Golang's linter.
You can check lint through the make
command, see it below:
make lint
The project also has a dependency import stardard, and the command below organizes your code in the stardard definied:
make format
All project files must have the license header. To check if all files are in agreement, run the command:
make license
If you need to add the license in any file, the command below inserts it in all files that do not have it:
make license-fix
The source code has two test segments, E2E and unitary test.
The e2e tests were writen with the packages:
You can run the tests by the command below:
make test-e2e
The unit tests were written with the Golang 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 the command below:
make coverage
Horusec uses the latest version to keep our source code safe. You can verify using the command below:
make security
Run the commands below in your project's root according to your Operating System to create Horusec's binary:
-
Windows
make build-install-cli-windows
-
Linux
make build-install-cli-linux
-
MacOs
make build-install-cli-darwin