dev/sg: add logging migration linter, add repo.State to lint.Runner
Created by: bobheadxi
-
lint.Runner
implementations can now leverage detailed diff information to optimize linting - Add a new linter,
sg lint logger-migration
, and corresponding CI job. Separate fromsg lint go
because we don't usesg lint go
yet: https://github.com/sourcegraph/sourcegraph/issues/33363
Closes https://github.com/sourcegraph/sourcegraph/issues/34482
Test plan
Locally:
➜ sourcegraph git:(lib-log-linter) go run ./dev/sg lint logger-migration
❌ Logging library linter (0s)
dev/sg/lints.go:77: banned usage '"log"': use github.com/sourcegraph/sourcegraph/lib/log instead
Done running linters.
error: failed linters: Logging library linter
exit status 1
In CI: