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

Replaced deadcode linter with unused linter. #5881

Merged
merged 1 commit into from
Dec 19, 2022
Merged

Replaced deadcode linter with unused linter. #5881

merged 1 commit into from
Dec 19, 2022

Conversation

bendory
Copy link
Contributor

@bendory bendory commented Dec 16, 2022

Changes

The deadcode linter is deprecated and unsupported. The unused linter is the drop-in replacement.

Note that configuration skips unused code detection in files where it is failing for unknown reasons.

Also: moved several vars and related functions from multiarch_utils to examples_test. These were only used in examples_test, and while the two files are part of the same package, the unused linter had trouble identifying that they were in fact in use in examples_test.

There are no expected functional changes in this PR.

/kind cleanup
/hold

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • [N/A] Has Docs included if any changes are user facing
  • [N/A] Has Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • [N/A] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

NONE

@tekton-robot tekton-robot added release-note-none Denotes a PR that doesnt merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 16, 2022
@bendory
Copy link
Contributor Author

bendory commented Dec 16, 2022

/test tekton-pipeline-unit-tests

retry what appears to be a flake

@XinruZhang
Copy link
Member

/test pull-tekton-pipeline-alpha-integration-tests

TestExamples is known flake

@tekton-robot tekton-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 16, 2022
@bendory
Copy link
Contributor Author

bendory commented Dec 16, 2022

I give up... if anyone has suggestions on how to disable the unused code linter on this file, please LMK -- I've followed all the documentation I can find and we're still getting failures.

I guess I'll leave this open for a bit before I abandon the work -- an unused code linter sure would be a "nice to have" for hygiene...

@Yongxuanzhang
Copy link
Member

Yongxuanzhang commented Dec 16, 2022

The new linter leads to the build failure, one case is getPipelineRunSecret is not used, but it is actually used. Am I miss anything? 🤔

@bendory
Copy link
Contributor Author

bendory commented Dec 18, 2022

/unhold

@tekton-robot tekton-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 18, 2022
@bendory
Copy link
Contributor Author

bendory commented Dec 18, 2022

🎉👯🕺🥳
It works!
/meow

@tekton-robot
Copy link
Collaborator

@bendory: cat image

In response to this:

🎉👯🕺🥳
It works!
/meow

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

test/multiarch_utils.go Outdated Show resolved Hide resolved
The `deadcode` linter is deprecated and unsupported. The `unused`
linter is the drop-in replacement.

Note that configuration skips unused code detection in files where it is
failing for unknown reasons.

Also: moved several vars and related functions from multiarch_utils to
examples_test. These were only used in examples_test, and while the two
files are part of the same package, the `unused` linter had trouble
identifying that they were in fact in use in examples_test.

There are no expected functional changes in this PR.
@tekton-robot tekton-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 19, 2022
@bendory bendory requested review from afrittoli and JeromeJu and removed request for abayer, pritidesai, afrittoli and JeromeJu December 19, 2022 14:17
Copy link
Member

@afrittoli afrittoli left a comment

Choose a reason for hiding this comment

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

Thank you!
/approve

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 19, 2022
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
test/multiarch_utils.go 53.8% 46.7% -7.2

Copy link
Member

@JeromeJu JeromeJu left a comment

Choose a reason for hiding this comment

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

Thanks David! LGTM

Copy link
Member

@jerop jerop left a comment

Choose a reason for hiding this comment

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

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 19, 2022
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli, JeromeJu, jerop

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@Yongxuanzhang Yongxuanzhang left a comment

Choose a reason for hiding this comment

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

/lgtm

.golangci.yml Show resolved Hide resolved
@JeromeJu
Copy link
Member

/retest
flake: TestReconcile_InvalidPipelineRuns/invalid-pipeline-missing-object-keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesnt merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants