Skip to content

chore: De-lint package imports

Administrator requested to merge ef/fix-all-packages into main

Created by: efritz

This PR moves code defined in internal/ that should be defined inside of cmd/frontend, as that's the only user. These violations were found by running

$ cd dev/depgraph
$ go build && ./depgraph lint NoBinarySpecificSharedCode
error: 19 errors:
(NoBinarySpecificSharedCode) enterprise/internal/codeintel/autoindex/enqueuer: imported only by frontend
(NoBinarySpecificSharedCode) enterprise/internal/codemonitors/background: imported only by repo-updater
(NoBinarySpecificSharedCode) enterprise/internal/insights/background: imported only by repo-updater
(NoBinarySpecificSharedCode) enterprise/internal/licensing/resolvers: imported only by frontend
(NoBinarySpecificSharedCode) internal/buildkite: imported only by ci
(NoBinarySpecificSharedCode) internal/cloneurls: imported only by frontend
(NoBinarySpecificSharedCode) internal/database/confdb: imported only by frontend
(NoBinarySpecificSharedCode) internal/gosrc: imported only by frontend
(NoBinarySpecificSharedCode) internal/highlight: imported only by frontend
(NoBinarySpecificSharedCode) internal/hubspot/hubspotutil: imported only by frontend
(NoBinarySpecificSharedCode) internal/markdown: imported only by frontend
(NoBinarySpecificSharedCode) internal/processrestart: imported only by frontend
(NoBinarySpecificSharedCode) internal/registry: imported only by frontend
(NoBinarySpecificSharedCode) internal/routevar: imported only by frontend
(NoBinarySpecificSharedCode) internal/search/searcher: imported only by frontend
(NoBinarySpecificSharedCode) internal/search/streaming: imported only by frontend
(NoBinarySpecificSharedCode) internal/sqliteutil: imported only by symbols
(NoBinarySpecificSharedCode) internal/symbols/protocol: imported only by symbols
(NoBinarySpecificSharedCode) internal/vfsutil: imported only by frontend

After this PR:

$ go build && ./depgraph lint NoBinarySpecificSharedCode
error: 6 errors:
(NoBinarySpecificSharedCode) enterprise/internal/codeintel/autoindex/inference: imported only by frontend
(NoBinarySpecificSharedCode) enterprise/internal/codemonitors/background: imported only by repo-updater
(NoBinarySpecificSharedCode) enterprise/internal/insights/background: imported only by repo-updater
(NoBinarySpecificSharedCode) enterprise/internal/licensing/resolvers: imported only by frontend
(NoBinarySpecificSharedCode) internal/search/searcher: imported only by frontend
(NoBinarySpecificSharedCode) internal/search/streaming: imported only by frontend

Merge request reports

Loading