chore(lint): Enable revive package-directory-mismatch rule - #9108
Open
uditjainstjis wants to merge 1 commit into
Open
chore(lint): Enable revive package-directory-mismatch rule#9108uditjainstjis wants to merge 1 commit into
uditjainstjis wants to merge 1 commit into
Conversation
Re-enables the package-directory-mismatch revive rule (part of jaegertracing#5506). - Rename package deepdependencies -> ddg so it matches its directory, updating the two importers in the jaegerquery extension. - internal/storage/v1/api (package "storage") and internal/storage/v2/api (package "storage_v2") intentionally keep a package name that differs from the "api" directory; exclude just those paths from this rule via exclusions.rules instead of scattering //nolint comments across files. Resolves jaegertracing#5506 for this rule. Signed-off-by: Udit Jain <uditjainstjis@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which problem is this PR solving?
reviverules one at a time. This PR enablespackage-directory-mismatch, which the config already marks as "should be enabled after fixing or disabling in a few packages".Description of the changes
cmd/jaeger/internal/extension/jaegerquery/internal/ddg— packagedeepdependenciesdid not match itsddgdirectory. Renamed the package toddgand updated its two importers in the jaegerquery extension (dropping the now-redundant import alias).internal/storage/v1/api(packagestorage) andinternal/storage/v2/api(packagestorage_v2) — these intentionally keep a package name that differs from theapidirectory.//nolintcomments scattered across the v1/v2 storage packages, the intentional cases are suppressed with a single path-scopedexclusions.rulesentry rather than inline directives.How was this change tested?
go build ./...passes.go testpasses for the renamed package, its importer (jaegerquery), and theinternal/storage/v1/api/internal/storage/v2/apitrees.golangci-lint runreports zeropackage-directory-mismatchviolations.Checklist