Skip to content
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

delete duplicate import and use ST1019 in golangci-lint #17211

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

Abirdcfly
Copy link
Contributor

Signed-off-by: Abirdcfly fp544037857@gmail.com

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Just notice #17131 in my timeline.
Use ST1019 will make golangci-lint auto report "importing the same package multiple times" problems, like below:

controller/event/handler/webhook/artifact/artifact.go:30:2: ST1019: package "github.com/goharbor/harbor/src/pkg/notifier/model" is being imported more than once (stylecheck)
        "github.com/goharbor/harbor/src/pkg/notifier/model"
        ^
controller/event/handler/webhook/artifact/artifact.go:31:2: ST1019(related information): other import of "github.com/goharbor/harbor/src/pkg/notifier/model" (stylecheck)
        notifyModel "github.com/goharbor/harbor/src/pkg/notifier/model"
        ^

Issue being fixed

Fixes #(issue)

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

release-note/ignore-for-release

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
@Abirdcfly Abirdcfly requested a review from a team as a code owner July 20, 2022 06:20
@Abirdcfly
Copy link
Contributor Author

release-note/ignore-for-release

@chlins chlins added the release-note/ignore-for-release Do not include PR or Issue for release notes label Jul 21, 2022
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #17211 (dcbcaab) into main (09371b4) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17211   +/-   ##
=======================================
  Coverage   67.07%   67.07%           
=======================================
  Files         993      993           
  Lines       83550    83550           
  Branches     2665     2665           
=======================================
+ Hits        56037    56042    +5     
+ Misses      23634    23629    -5     
  Partials     3879     3879           
Flag Coverage Δ
unittests 67.07% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...troller/event/handler/webhook/artifact/artifact.go 0.00% <ø> (ø)
...rc/controller/event/handler/webhook/quota/quota.go 55.76% <ø> (ø)
...-job/gc-page/gc/gc-history/gc-history.component.ts 40.22% <0.00%> (-5.75%) ⬇️
src/common/utils/passports.go 84.61% <0.00%> (-5.13%) ⬇️
...es/vulnerability/vulnerability-config.component.ts 54.07% <0.00%> (-4.45%) ⬇️
src/controller/event/topic.go 9.00% <0.00%> (+7.20%) ⬆️
src/common/rbac/system/namespace.go 44.44% <0.00%> (+11.11%) ⬆️
...g-retention-tasks/tag-retention-tasks.component.ts 86.11% <0.00%> (+25.00%) ⬆️

Copy link
Contributor

@MinerYang MinerYang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@MinerYang MinerYang merged commit 2fece8c into goharbor:main Jul 25, 2022
sluetze pushed a commit to sluetze/harbor that referenced this pull request Oct 29, 2022
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
mcsage pushed a commit to mcsage/harbor that referenced this pull request Feb 16, 2023
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
Signed-off-by: Stephan Hohn <stephan.hohn@tech11.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/ignore-for-release Do not include PR or Issue for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants