chore: Forbids "log" package only for aggregators, inputs, outputs, parsers and processors (#10191)

Co-authored-by: Pawel Zak <Pawel Zak>
This commit is contained in:
Paweł Żak 2021-12-03 18:50:51 +01:00 committed by GitHub
parent 2269ff1242
commit 1143a50da3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View File

@ -126,5 +126,10 @@ issues:
- path: _test\.go
text: "parameter.*seems to be a control flag, avoid control coupling"
- path: (^agent/|^cmd/|^config/|^filter/|^internal/|^logger/|^metric/|^models/|^selfstat/|^testutil/|^plugins/serializers/)
text: "imports-blacklist: should not use the following blacklisted import: \"log\""
linters:
- revive
output:
format: tab

View File

@ -2,7 +2,7 @@ package logrus
import (
"io"
"log"
"log" //nolint:revive // Allow exceptional but valid use of log here.
"strings"
"sync"

View File

@ -3,7 +3,7 @@ package shim
import (
"errors"
"fmt"
"log"
"log" //nolint:revive // Allow exceptional but valid use of log here.
"os"
"github.com/BurntSushi/toml"

View File

@ -2,7 +2,7 @@ package shim
import (
"fmt"
"log"
"log" //nolint:revive // Allow exceptional but valid use of log here.
"os"
"reflect"