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

refactor: remove unused functions and variables #499

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

G-Rath
Copy link
Collaborator

@G-Rath G-Rath commented Feb 27, 2025

This enables the unused linter, which reports functions and variables that are not being used, of which we have a fair amount - I'm hoping that none of these are used by internal magic, but I'm expecting at least probably is...

Relates to #274

@G-Rath G-Rath mentioned this pull request Feb 27, 2025
46 tasks
depParent = depTypeWithOrigin("parent")
depPlugin = depTypeWithOrigin("[email protected]:plugin")
depProfileOne = depTypeWithOrigin("profile@profile-one")
depProfileTwoMgmt = depTypeWithOrigin("profile@profile-two@management")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these will be needed when we gradually migrate guided remediation, but we can add them back anyway, so I am fine with removing them. for other changes, I will let @erikvarga to take a look.

@@ -584,21 +584,6 @@ func TestChainFSReadDir(t *testing.T) {
// CHAINLAYER TESTING HELPER METHODS
// ========================================================

func checkError(t *testing.T, funcName string, gotErr error, wantErr error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@another-rex do we need these for layer extraction?

Copy link
Collaborator

Choose a reason for hiding this comment

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

No I don't think so, and I think we would want to use cmp.Diff instead anyway I believe.

@G-Rath G-Rath force-pushed the linting/enable-unused branch from dab9dc9 to 5d8c75b Compare March 2, 2025 19:55
@G-Rath G-Rath force-pushed the linting/enable-unused branch from 5d8c75b to f908d84 Compare March 6, 2025 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants