2023-07-18 08:16:27 +00:00
# linters
## Overview
`linters` is a project that enables the integration of custom linting rules into the [golangci-lint ](https://github.com/golangci/golangci-lint ) framework.
## Available linters
2023-08-01 11:39:49 +00:00
| Name | Description |
| ----------------------- | --------------------------------------------------------------------------- |
| [noliteral ](#noliteral ) | The tool prohibits the use of literal string arguments in logging functions |
## Linters Configuration
2023-07-18 08:16:27 +00:00
2023-08-01 11:39:49 +00:00
### noliteral
```yml
linters-settings:
custom:
noliteral:
path: .bin/external_linters.so
original-url: git.frostfs.info/TrueCloudLab/linters.git
settings:
target-methods : ["reportFlushError", "reportError"] #optional . Enabled by default "Debug", "Info", "Warn", "Error"
```
2023-07-18 08:16:27 +00:00
## Installation
```bash
git clone git.frostfs.info/TrueCloudLab/linters
cd linters
make lib OUT_DIR=< Path to the directory with libraries >
```
## Usage
2023-07-31 09:59:51 +00:00
Add to .golangci.yml
2023-07-18 08:16:27 +00:00
```yml
linters-settings:
custom:
custom-linters:
path: < Path to the directory with libraries >
original-url: git.frostfs.info/TrueCloudLab/linters
linters:
enable:
custom-linters
```