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

Fix: Honor linter rules in CI and locally #15492

Merged
merged 2 commits into from
Aug 19, 2022
Merged

Conversation

mlafeldt
Copy link
Contributor

RUSTFLAGS take precedence over target.<triple>.rustflags. Therefore, setting the env var globally in CI would always override whatever linter rules are allowed or denied in .cargo/config.toml.

With this change, we ensure that problems are detected both in CI and locally, using either cargo clippy or lint.js.


For context, in #15453 I moved the lint rules to .cargo/config.toml.

This fix would also unblock #15464 by allowing clippy::derive-partial-eq-without-eq in CI.

RUSTFLAGS take precedence over `target.<triple>.rustflags`. Therefore,
setting the env var globally in CI would always override whatever linter
rules are allowed or denied in .cargo/config.toml.

With this change, we ensure that problems are detected both in CI and
locally, using either cargo clippy or lint.js.
let res =
// SAFETY: call to libc::sendfile()
unsafe { libc::sendfile(self.io.1, self.io.0, &mut offset, count) };
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This "problem" was detected as a result of this PR.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - thank you

@ry ry merged commit 1848c7e into denoland:main Aug 19, 2022
@mlafeldt mlafeldt deleted the honor-linter-rules branch August 19, 2022 12:18
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