Skip to content

Fix clippy warnings #6932

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

Merged
merged 4 commits into from
Dec 29, 2024
Merged

Fix clippy warnings #6932

merged 4 commits into from
Dec 29, 2024

Conversation

RenjiSann
Copy link
Collaborator

No description provided.

@@ -315,6 +315,7 @@ fn stat_split(stat: &str) -> Vec<String> {
}

/// Iterating pid in current system
#[allow(dead_code)]
Copy link
Contributor

Choose a reason for hiding this comment

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

please comment why it is dead code :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At first I just did it mindlessly because clippy was complaining. Now that I take a look at it, it seems that the function is only ever used in the test section below. It's used nowhere else.

Actually, the whole file is used absolutely nowhere, so I'm not sure as of what to do with it.
Do we keep it for maybe using it in the future ? Or just get rid of it ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sylvestre ping

Copy link
Contributor

Choose a reason for hiding this comment

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

Just add a comment explaining this please :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've actually moved the #[allow(dead_code)] to the root of the file, because warning were still emitted on other functions

Copy link
Contributor

@sylvestre sylvestre Dec 21, 2024

Choose a reason for hiding this comment

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

oh, we should remove it from procps and leverage uucore

Copy link
Contributor

Choose a reason for hiding this comment

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

@Krysztal112233 would it be possible for you to do it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, but it might take some time.

Copy link
Contributor

Choose a reason for hiding this comment

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

In the meantime, it might be worth just updating the comment to indicate this intention, so this PR can get merged.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point. Thanks

Copy link

github-actions bot commented Dec 6, 2024

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@jtracey
Copy link
Contributor

jtracey commented Dec 19, 2024

Can we add --tests to the clippy CICD run to catch these earlier?

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre merged commit 746a173 into uutils:main Dec 29, 2024
62 of 63 checks passed
@RenjiSann RenjiSann deleted the clippy-fix branch January 22, 2025 09:34
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