New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lint for aliasing autoscaling import correctly #10885
Conversation
Codecov Report
@@ Coverage Diff @@
## main #10885 +/- ##
==========================================
- Coverage 87.99% 87.95% -0.05%
==========================================
Files 188 188
Lines 9113 9113
==========================================
- Hits 8019 8015 -4
- Misses 839 842 +3
- Partials 255 256 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty cool!
To pick up importas linter for knative/serving#10885.
But I liked the short one? |
I don't actually care much (at all ;)) which alias we pick, so much as that we're consistent (it's easy to change the lint if we want a different import). I picked this alias in #10666 because it concatenates the final two bits of the path without the slash, which has at least some logic to it (and is consistent with how we generally import other things that clash, e.g. servingv1 etc). |
|
If we do want to rename again, importas has a handy |
To pick up importas linter for knative/serving#10885.
rebased, hopefully this should run nicely now golangci-lint version is bumped 🤞 |
This needs another rebase now and some workaround for the misspell issue :( |
And fix a file that I apparently forgot to `git add` when I fixed this before, and never spotted because we didn't lint it :).
lets try this again |
\o/ think everything has now trickled through and this is mergable! /unhold |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: markusthoemmes The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Someone very kindly did the work to add the linter I hacked up for funsies when I fixed these before to golanglint-ci, so we might as well use it!
Also, fix up a package that I apparently forgot to
git add
when I fixed these before, and never spotted because we didn't lint it :)./hold I think I'll need to bump the golanglint-ci version in knative/.github before this will work
/assign @markusthoemmes