linters/README.md
Alexander Chuprov 2942b612a8 [#6] noliteral: add noliteral configuration
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2023-08-01 14:39:49 +03:00

1.3 KiB

linters

Overview

linters is a project that enables the integration of custom linting rules into the golangci-lint framework.

Available linters

Name Description
noliteral The tool prohibits the use of literal string arguments in logging functions

Linters Configuration

noliteral

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"

Installation

    git clone git.frostfs.info/TrueCloudLab/linters
    cd linters
    make lib OUT_DIR=<Path to the directory with libraries>

Usage

Add to .golangci.yml


    linters-settings:
    custom:
        custom-linters:
            path: <Path to the directory with libraries>
            original-url: git.frostfs.info/TrueCloudLab/linters

    linters:
        enable:
            custom-linters