[chore] Use crosslink tidylist
in make gotidy
(attempt 2)
#37418
+340
−9
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.
Description
This is a second attempt at PR #37142, see that one for context.
The PR was reverted in #37173, because the result of
make tidylist
was not a pure function of the repo state. The output of the tool depends on allgo.mod
files present in the repo directory, including those that may be.gitignored
, such as the ones generated incmd/otelcontribcol
andcmd/oteltestbedcol
.Since then, I added a
--skip
flag to the tool, which allows us to make the tool ignore these problematicgo.mod
files.Automatic detection of
.gitignored
files may be desirable if some developers have other non-gitted Go modules inside their repo directory. As this would require more advanced Git integration in the tool and should be easily avoided, I've decided to keep this more manual approach.Link to tracking issue
Resolves #37336.
See previous PR for impacted issues in core.
Testing
See previous PR for initial testing.
I've tried running the tool locally, with and without the generated files in
cmd/otelcontribcol
, and the output was identical, confirming that the previous issue should be fixed.