...

Text file src/k8s.io/kubernetes/hack/logcheck.conf

Documentation: k8s.io/kubernetes/hack

     1# hack/logcheck.conf contains regular expressions that are matched against <pkg>/<file>,
     2# for example k8s.io/cmd/kube-scheduler/app/config/config.go.
     3#
     4# By default, structured logging call parameters are checked, but usage of
     5# those calls is not required. That is changed on a per-file basis.
     6#
     7# Remember to clean the golangci-lint cache when changing the configuration and
     8# running the verify-golangci-lint.sh script multiple times, otherwise
     9# golangci-lint will report stale results:
    10#    _output/local/bin/golangci-lint cache clean
    11
    12# At this point we don't enforce the usage structured logging calls except in
    13# those packages that were migrated. This disables the check for other files.
    14-structured .*
    15
    16# Now enable it again for migrated packages.
    17structured k8s.io/kubernetes/cmd/kubelet/.*
    18structured k8s.io/kubernetes/pkg/kubelet/.*
    19structured k8s.io/kubernetes/pkg/proxy/.*
    20structured k8s.io/kms/.*
    21structured k8s.io/apiserver/pkg/storage/value/.*
    22structured k8s.io/apiserver/pkg/server/options/encryptionconfig/.*
    23
    24# The following packages have been migrated to contextual logging.
    25# Packages matched here do not have to be listed above because
    26# "contextual" implies "structured".
    27contextual k8s.io/client-go/metadata/.*
    28contextual k8s.io/client-go/tools/events/.*
    29contextual k8s.io/client-go/tools/record/.*
    30contextual k8s.io/dynamic-resource-allocation/.*
    31contextual k8s.io/kubernetes/cmd/kube-proxy/.*
    32contextual k8s.io/kubernetes/cmd/kube-scheduler/.*
    33contextual k8s.io/kubernetes/pkg/controller/.*
    34contextual k8s.io/kubernetes/pkg/scheduler/.*
    35contextual k8s.io/kubernetes/test/e2e/dra/.*
    36
    37# As long as contextual logging is alpha or beta, all WithName, WithValues,
    38# NewContext calls have to go through klog. Once it is GA, we can lift
    39# this restriction. Whether we then do a global search/replace remains
    40# to be decided.
    41with-helpers .*

View as plain text