Skip to content

Conversation

nicholasbishop
Copy link
Member

The CI only lints the uefi package but with all features enabled, while build.py lints all packages but with no features enabled. Change build.py to lint all packages with a subset of features enabled (all the uefi features that enable more code), and change the CI to just run the build.py clippy command so that the two stay in sync.

Also fixed a few clippy lints in the test runner.

Features are checked against the current package, which by default is
detected by the CWD. This means that if you are in the test runner,
enabling the "exts" feature doesn't work because that package doesn't
have such a feature, only the uefi packages does. So, as with the
`build.py test` command, set the manifest path to the uefi crate so that
this command does the right thing regardless of the CWD.

Also changed "--all" to "--workspace", since the former is deprecated.
As with the CI step that runs "build.py test", this makes it easier to
keep the two in sync. Previously the CI was only linting the uefi
package, now it will match build.py's behavior and lint the whole
workspace.
Copy link
Collaborator

@GabrielMajeri GabrielMajeri left a comment

Choose a reason for hiding this comment

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

Sounds good, didn't realize we ended up with a drift between the lints run in CI and the ones run by default locally.

@GabrielMajeri GabrielMajeri changed the title Improve clippy linting in build.py and CI Improve clippy linting in build.py and CI Dec 11, 2021
@GabrielMajeri GabrielMajeri merged commit 11cea89 into rust-osdev:master Dec 11, 2021
@nicholasbishop nicholasbishop deleted the bishop-better-clippy branch December 12, 2021 21:39
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.

2 participants