Skip to content

chore: address a few clippy lints that break API #7697

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 1 commit into from
Apr 15, 2025
Merged

Conversation

nyurik
Copy link
Contributor

@nyurik nyurik commented Apr 8, 2025

  • Disabled avoid-breaking-exported-api and sorted items in Clippy.toml
  • Renamed BSD -> Bsd, SYSV -> SysV, and CRC -> Crc to match Rust naming rules
  • Renamed items in BackupMode and UpdateMode because they repeated the same word in every item - making it redundant and harder to read

Copy link

github-actions bot commented Apr 8, 2025

GNU testsuite comparison:

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

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

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

These changes are a bit pedantic, but I guess they're fine. I'd merge this without the clippy config changes, but I'll wait for other maintainers' opinions on those before doing that.

@nyurik
Copy link
Contributor Author

nyurik commented Apr 8, 2025

thx @tertsdiepraam - do note that you already have these pedantic lints enabled in the main Cargo.toml -- the reason they were not fixed was because Clippy skips many lints which are "public" - but since uutils goal does not seem to be primarily a library, but rather an executable, it makes no sense to skip so many clippy lints just because the items happen to be exported. Thus, I would highly recommend enabling it in the Clippy.toml to keep the codebase consistent

@tertsdiepraam
Copy link
Member

I kind of agree, but there is a library component to uutils, which is used by nushell for example.

@nyurik
Copy link
Contributor Author

nyurik commented Apr 8, 2025

thx, didn't know about that. The issue still remains - if you do not enable it in Clippy.toml, new PRs will not be checked by Clippy if they are public - potentially missing some important notifications. The issue with nushell should be solved with the semver checker - which would flag these changes to go into the breaking changes release.

@tertsdiepraam
Copy link
Member

Since every release is currently breaking, I guess it's more of a thing of not changing things too much arbitrarily. But for a proper long term solution, you are right of course!

Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/misc/tee is no longer failing!

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/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/stdbuf (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails 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)
Congrats! The gnu test tests/misc/tee is no longer failing!

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails 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)
Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails 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)

* Disabled `avoid-breaking-exported-api` and sorted items in Clippy.toml
* Renamed `BSD` -> `Bsd`, `SYSV` -> `SysV`, and `CRC` -> `Crc` to match Rust naming rules
* Renamed items in `BackupMode` and `UpdateMode` because they repeated the same word in every item - making it redundant and harder to read
Copy link

GNU testsuite comparison:

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

@sylvestre sylvestre merged commit 148b341 into uutils:main Apr 15, 2025
68 of 69 checks passed
@nyurik nyurik deleted the names branch April 15, 2025 12:04
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.

3 participants