bazel: first pass at moving moving logging linting into nogo (#58910)

* First pass at moving moving logging linting into Bazel

* fixed negation operators

* Update dev/linters/logging/logging.go

Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>

* added more exceptions and refactored one or two impls

* added nogo lint pragmas to offending files

* ran configure

* reverted git-combine refactor

* ran configure

* reverted test as well

---------

Co-authored-by: William Bezuidenhout <william.bezuidenhout@sourcegraph.com>
This commit is contained in:
James McNamara 2024-01-02 13:07:25 -05:00 committed by GitHub
parent 30cf61e1bf
commit 960d97bf8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
134 changed files with 203 additions and 138 deletions

View File

@ -315,6 +315,7 @@ nogo(
"//dev/linters/gocheckcompilerdirectives",
"//dev/linters/gocritic",
"//dev/linters/ineffassign",
"//dev/linters/logging",
"//dev/linters/unparam",
"//dev/linters/tracinglibraries",
"//dev/linters/dbconn",

View File

@ -7,7 +7,7 @@ import (
"sync"
"sync/atomic"
"github.com/inconshreveable/log15" //nolint:go
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log //nolint:go
"github.com/sourcegraph/sourcegraph/internal/conf"
"github.com/sourcegraph/sourcegraph/schema"

View File

@ -8,7 +8,7 @@ import (
"sync"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/database"
"github.com/sourcegraph/sourcegraph/internal/extsvc/github"

View File

@ -12,7 +12,7 @@ import (
"sync"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"go.opentelemetry.io/otel/attribute"
"github.com/sourcegraph/sourcegraph/cmd/frontend/envvar"

View File

@ -6,7 +6,7 @@ import (
"flag"
"fmt"
"io"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"net/http/httptest"
"net/url"
@ -16,7 +16,7 @@ import (
"testing"
"github.com/grafana/regexp"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
sglog "github.com/sourcegraph/log"
"github.com/sourcegraph/log/logtest"
"github.com/stretchr/testify/assert"

View File

@ -11,7 +11,7 @@ import (
"strings"
"sync"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/conc/pool"
"github.com/sourcegraph/go-diff/diff"

View File

@ -9,7 +9,7 @@ import (
"sync"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"go.opentelemetry.io/otel/attribute"

View File

@ -6,7 +6,7 @@ import (
"time"
"github.com/graph-gophers/graphql-go"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/log"

View File

@ -9,7 +9,7 @@ import (
"github.com/Masterminds/semver"
"github.com/gomodule/redigo/redis"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/hooks"
"github.com/sourcegraph/sourcegraph/internal/actor"

View File

@ -4,7 +4,7 @@ import (
"context"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/internal/processrestart"
"github.com/sourcegraph/sourcegraph/internal/actor"

View File

@ -5,7 +5,7 @@ import (
"github.com/graph-gophers/graphql-go"
"github.com/graph-gophers/graphql-go/relay"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/hubspot/hubspotutil"
sgactor "github.com/sourcegraph/sourcegraph/internal/actor"

View File

@ -7,7 +7,7 @@ import (
"strings"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"

View File

@ -2,9 +2,9 @@ package hubspotutil
import (
"context"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/envvar"
"github.com/sourcegraph/sourcegraph/cmd/frontend/hubspot"

View File

@ -6,7 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"net/http/httputil"
"net/url"

View File

@ -8,7 +8,7 @@ import (
"strings"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/watch"
"k8s.io/client-go/kubernetes"

View File

@ -6,7 +6,7 @@ import (
"fmt"
"net/http"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/internal/handlerutil"
"github.com/sourcegraph/sourcegraph/internal/conf"

View File

@ -5,7 +5,7 @@ import (
"html/template"
"net/http"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/globals"
)

View File

@ -14,7 +14,7 @@ import (
"go.opentelemetry.io/otel/sdk/metric"
"go.uber.org/atomic"
"go.uber.org/zap"
"go.uber.org/zap" //nolint:logging // dependencies require direct usage of zap
"github.com/sourcegraph/sourcegraph/internal/otlpenv"
"github.com/sourcegraph/sourcegraph/lib/errors"

View File

@ -5,7 +5,7 @@ import (
"io"
"net/http"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/auth"
"github.com/sourcegraph/sourcegraph/internal/database"

View File

@ -4,7 +4,7 @@ import (
"net/http"
"github.com/gorilla/mux"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"

View File

@ -3,7 +3,7 @@ package app
import (
"net/http"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/auth"
"github.com/sourcegraph/sourcegraph/internal/database"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -8,7 +8,7 @@ import (
"github.com/dghubble/gologin/v2"
"github.com/dghubble/gologin/v2/github"
goauth2 "github.com/dghubble/gologin/v2/oauth2"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"golang.org/x/oauth2"
gh "github.com/sourcegraph/sourcegraph/internal/extsvc/github"

View File

@ -10,7 +10,7 @@ import (
"time"
"github.com/dghubble/gologin/v2/github"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"golang.org/x/oauth2"
"github.com/sourcegraph/log"

View File

@ -5,7 +5,7 @@ import (
"net/http"
"strings"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/auth"
"github.com/sourcegraph/sourcegraph/internal/actor"

View File

@ -11,7 +11,7 @@ package main
import (
"flag"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"net/http/httputil"
"net/url"

View File

@ -10,7 +10,7 @@ import (
"strconv"
"strings"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"go.opentelemetry.io/otel/attribute"
"golang.org/x/oauth2"

View File

@ -10,7 +10,7 @@ import (
"path"
goauth2 "github.com/dghubble/gologin/v2/oauth2"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"golang.org/x/oauth2"
"github.com/sourcegraph/sourcegraph/cmd/frontend/external/session"

View File

@ -11,7 +11,7 @@ import (
"time"
"github.com/coreos/go-oidc"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/russellhaering/gosaml2/uuid"
"golang.org/x/oauth2"

View File

@ -6,13 +6,13 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
stdlog "log"
stdlog "log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"path"
"strconv"
"strings"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/log"
"github.com/sourcegraph/sourcegraph/internal/auth/providers"

View File

@ -9,7 +9,7 @@ import (
"strings"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/auth"
"github.com/sourcegraph/sourcegraph/cmd/frontend/external/session"

View File

@ -12,7 +12,7 @@ import (
"time"
"github.com/graph-gophers/graphql-go"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/log"

View File

@ -9,7 +9,7 @@ import (
sglog "github.com/sourcegraph/log"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/api"
"github.com/sourcegraph/sourcegraph/internal/batches/state"

View File

@ -5,7 +5,7 @@ import (
"strings"
"github.com/gomodule/redigo/redis"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/redispool"
"github.com/sourcegraph/sourcegraph/lib/errors"

View File

@ -1,7 +1,7 @@
package bg
import (
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/rcache"
"github.com/sourcegraph/sourcegraph/internal/redispool"

View File

@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // Legacy loghandlers for log15
)
// Trace returns a filter for the given traces that run longer than threshold

View File

@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestNotNoisey(t *testing.T) {

View File

@ -2,7 +2,7 @@ package middleware
import (
"html/template"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"path"
"strings"

View File

@ -1,7 +1,7 @@
package middleware
import (
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"net/http/httputil"
"strconv"

View File

@ -4,7 +4,7 @@ import (
"context"
"database/sql"
"fmt"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"os"
"time"

View File

@ -6,7 +6,7 @@ import (
"io"
"strings"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/kr/text"
"github.com/sourcegraph/sourcegraph/internal/env"

View File

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/log"
"github.com/sourcegraph/go-langserver/pkg/lsp"

View File

@ -7,7 +7,7 @@ import (
"os"
"runtime"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/errcode"
"github.com/sourcegraph/sourcegraph/lib/errors"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -2,7 +2,7 @@ package httpapi
import (
"context"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"os"
"reflect"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/frontend/envvar"
"github.com/sourcegraph/sourcegraph/internal/actor"

View File

@ -7,7 +7,7 @@ import (
"strconv"
"github.com/google/go-github/v55/github"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/log"

View File

@ -6,7 +6,7 @@ import (
"io"
"net/http"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/conf"
"github.com/sourcegraph/sourcegraph/internal/database"

View File

@ -4,7 +4,7 @@ import (
"context"
"io"
"io/fs"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"os/exec"
"path"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -5,7 +5,7 @@ import (
"fmt"
"hash/fnv"
"io"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"sort"
"sync"

View File

@ -1,7 +1,7 @@
package goreman
import (
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"os/signal"
"sync"

View File

@ -3,7 +3,7 @@
package main
import (
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"github.com/sourcegraph/sourcegraph/cmd/server/internal/goreman"

View File

@ -1,7 +1,7 @@
package shared
import (
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
)

View File

@ -4,7 +4,7 @@ import (
"bytes"
"fmt"
"io"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"os/exec"
"path/filepath"

View File

@ -8,7 +8,7 @@ import (
"encoding/json"
"flag"
"fmt"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"os/exec"
"path/filepath"

View File

@ -4,7 +4,7 @@ import (
"context"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/diskcache"
"github.com/sourcegraph/sourcegraph/internal/goroutine"

View File

@ -4,7 +4,7 @@ import (
"context"
"database/sql"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/cmd/symbols/parser"
"github.com/sourcegraph/sourcegraph/internal/database/basestore"

View File

@ -6,7 +6,7 @@ import (
"sync"
"sync/atomic"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/go-ctags"
"go.opentelemetry.io/otel/attribute"

View File

@ -9,7 +9,8 @@ import (
"os"
"strings"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
symbolsTypes "github.com/sourcegraph/sourcegraph/cmd/symbols/types"
"github.com/sourcegraph/sourcegraph/internal/types"
"github.com/sourcegraph/sourcegraph/lib/errors"

View File

@ -8,7 +8,7 @@ import (
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/cloudwatch"
"github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/env"
)

View File

@ -6,7 +6,7 @@ import (
monitoring "cloud.google.com/go/monitoring/apiv3/v2"
"cloud.google.com/go/monitoring/apiv3/v2/monitoringpb"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"google.golang.org/api/option"
metricpb "google.golang.org/genproto/googleapis/api/metric"
"google.golang.org/genproto/googleapis/api/monitoredres"

View File

@ -3,7 +3,7 @@ package executorqueue
import (
"slices"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
executortypes "github.com/sourcegraph/sourcegraph/internal/executor/types"
"github.com/sourcegraph/sourcegraph/lib/errors"

View File

@ -4,7 +4,7 @@ import (
"context"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/conf"
"github.com/sourcegraph/sourcegraph/internal/database"

View File

@ -0,0 +1,13 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "logging",
srcs = ["logging.go"],
importpath = "github.com/sourcegraph/sourcegraph/dev/linters/logging",
visibility = ["//visibility:public"],
deps = [
"//dev/linters/nolint",
"@com_github_openpeedeep_depguard_v2//:go_default_library",
"@org_golang_x_tools//go/analysis",
],
)

View File

@ -0,0 +1,45 @@
package logging
import (
"fmt"
"github.com/OpenPeeDeeP/depguard/v2"
"golang.org/x/tools/go/analysis"
"github.com/sourcegraph/sourcegraph/dev/linters/nolint"
)
// This analyzer is modeled after the one in
// https://sourcegraph.sourcegraph.com/github.com/sourcegraph/sourcegraph@f6ae87add606c65876b87d378929fcb80c3bb493/-/blob/dev/linters/depguard/depguard.go
// These could potentially be combined into one analyzer.
var Analyzer *analysis.Analyzer = createAnalyzer()
const useLogInsteadMessage = `use "github.com/sourcegraph/log" instead`
// Deny is a map which contains all the deprecated logging packages
// The key of the map is the package name that is not allowed - globs can be used as keys.
// The value of the key is the reason to give as to why the logger is not allowed.
var Deny = map[string]string{
"log$": useLogInsteadMessage,
"github.com/inconshreveable/log15$": useLogInsteadMessage,
"go.uber.org/zap": useLogInsteadMessage,
}
func createAnalyzer() *analysis.Analyzer {
settings := &depguard.LinterSettings{
"deprecated loggers": &depguard.List{
Deny: Deny,
Files: []string{
// Let everything in dev use whatever they want
"!**/dev/**/*.go",
},
},
}
analyzer, err := depguard.NewAnalyzer(settings)
if err != nil {
panic(fmt.Sprintf("failed to create deprecated logging analyzer: %v", err))
}
analyzer.Name = "logging"
return nolint.Wrap(analyzer)
}

View File

@ -7,7 +7,7 @@ import (
"sort"
"sync"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/extsvc"
"github.com/sourcegraph/sourcegraph/schema"

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -5,7 +5,7 @@ import (
"os"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
)
func TestMain(m *testing.M) {

View File

@ -9,7 +9,7 @@ import (
"text/template"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/log"
bgql "github.com/sourcegraph/sourcegraph/internal/batches/graphql"

View File

@ -4,7 +4,7 @@ import (
"context"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/batches/store"
"github.com/sourcegraph/sourcegraph/internal/batches/types/scheduler/config"

View File

@ -3,7 +3,7 @@ package scheduler
import (
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/batches/types/scheduler/window"
"github.com/sourcegraph/sourcegraph/internal/goroutine"

View File

@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
btypes "github.com/sourcegraph/sourcegraph/internal/batches/types"

View File

@ -7,7 +7,7 @@ import (
"strings"
"testing"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/stretchr/testify/assert"
btypes "github.com/sourcegraph/sourcegraph/internal/batches/types"

View File

@ -11,7 +11,7 @@ import (
"github.com/Masterminds/semver"
"github.com/google/go-cmp/cmp"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/stretchr/testify/assert"
btypes "github.com/sourcegraph/sourcegraph/internal/batches/types"

View File

@ -12,7 +12,7 @@ import (
"github.com/dnaeon/go-vcr/cassette"
"github.com/dnaeon/go-vcr/recorder"
"github.com/grafana/regexp"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/extsvc"
"github.com/sourcegraph/sourcegraph/internal/httpcli"

View File

@ -4,7 +4,7 @@ import (
"sort"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
adobatches "github.com/sourcegraph/sourcegraph/internal/batches/sources/azuredevops"
gerritbatches "github.com/sourcegraph/sourcegraph/internal/batches/sources/gerrit"

View File

@ -8,7 +8,7 @@ import (
"time"
"github.com/goware/urlx"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/go-diff/diff"
"github.com/sourcegraph/sourcegraph/internal/api"

View File

@ -8,7 +8,7 @@ import (
"github.com/sourcegraph/sourcegraph/internal/extsvc/azuredevops"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/extsvc/bitbucketcloud"
"github.com/sourcegraph/sourcegraph/internal/extsvc/bitbucketserver"

View File

@ -5,7 +5,7 @@ import (
"encoding/json"
"sync"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/batches/types/scheduler/window"
"github.com/sourcegraph/sourcegraph/internal/conf"

View File

@ -4,7 +4,7 @@ import (
"context"
"flag"
"fmt"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"math"
"net/http"
"net/url"
@ -14,7 +14,7 @@ import (
"sync"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/client_golang/prometheus/promhttp"

View File

@ -4,7 +4,7 @@ import (
"database/sql"
"sync"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
_ "github.com/mattn/go-sqlite3"
"github.com/sourcegraph/sourcegraph/internal/database/dbutil"

View File

@ -9,7 +9,7 @@ import (
"path/filepath"
"strings"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/prometheus/client_golang/prometheus"
"github.com/schollz/progressbar/v3"
)

View File

@ -12,7 +12,7 @@ import (
"time"
"github.com/google/go-github/v55/github"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/prometheus/client_golang/prometheus"
"github.com/schollz/progressbar/v3"
"golang.org/x/oauth2"

View File

@ -1,5 +1,5 @@
load("//dev:go_defs.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
load("//dev:go_defs.bzl", "go_test")
go_library(
name = "git-combine_lib",

View File

@ -5,7 +5,7 @@ import (
"fmt"
"hash/crc32"
"io/fs"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"math"
"math/rand"
"os"

View File

@ -5,7 +5,7 @@ import (
"flag"
"fmt"
"io"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"strings"
"time"

View File

@ -2,7 +2,7 @@ package main
import (
"io"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"github.com/sourcegraph/sourcegraph/internal/jsonc"

View File

@ -13,7 +13,7 @@ import (
"image/color"
"image/png"
"io"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"net/http"
"os"
"sort"

View File

@ -14,7 +14,7 @@ import (
"syscall"
"time"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/prometheus/client_golang/prometheus/promhttp"
"gopkg.in/natefinch/lumberjack.v2"
)

View File

@ -5,7 +5,7 @@ package main
import (
"context"
"flag"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"strings"

View File

@ -2,7 +2,7 @@ package conf
import (
"encoding/hex"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"strings"
"time"

View File

@ -3,7 +3,7 @@ package conf
import (
"context"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"os"
"path/filepath"
"strings"

View File

@ -5,7 +5,7 @@ import (
"strings"
"github.com/grafana/regexp"
"github.com/inconshreveable/log15"
"github.com/inconshreveable/log15" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/api"
"github.com/sourcegraph/sourcegraph/internal/conf"

View File

@ -1,7 +1,7 @@
package conf
import (
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"github.com/sourcegraph/sourcegraph/internal/conf/conftypes"
)

View File

@ -5,7 +5,7 @@ import (
"database/sql"
"database/sql/driver"
"fmt"
"log"
"log" //nolint:logging // TODO move all logging to sourcegraph/log
"strconv"
"strings"
"sync"

Some files were not shown because too many files have changed in this diff Show More