mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
Fix: Honor linter rules in CI and locally (#15492)
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.
This commit is contained in:
parent
25a109d9ea
commit
1848c7e361
3 changed files with 2 additions and 5 deletions
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
|
@ -140,9 +140,6 @@ jobs:
|
||||||
service_account_key: ${{ secrets.GCP_SA_KEY }}
|
service_account_key: ${{ secrets.GCP_SA_KEY }}
|
||||||
export_default_credentials: true
|
export_default_credentials: true
|
||||||
|
|
||||||
- name: Error on warning
|
|
||||||
run: echo "RUSTFLAGS=-D warnings" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Configure canary build
|
- name: Configure canary build
|
||||||
if: |
|
if: |
|
||||||
matrix.job == 'test' &&
|
matrix.job == 'test' &&
|
||||||
|
|
|
@ -21,8 +21,8 @@ impl SendFile {
|
||||||
let count = 0x7ffff000;
|
let count = 0x7ffff000;
|
||||||
let mut offset = self.written as libc::off_t;
|
let mut offset = self.written as libc::off_t;
|
||||||
|
|
||||||
// SAFETY: call to libc::sendfile()
|
|
||||||
let res =
|
let res =
|
||||||
|
// SAFETY: call to libc::sendfile()
|
||||||
unsafe { libc::sendfile(self.io.1, self.io.0, &mut offset, count) };
|
unsafe { libc::sendfile(self.io.1, self.io.0, &mut offset, count) };
|
||||||
if res == -1 {
|
if res == -1 {
|
||||||
Err(io::Error::last_os_error())
|
Err(io::Error::last_os_error())
|
||||||
|
|
|
@ -111,7 +111,7 @@ async function clippy() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { success } = await Deno.spawn("cargo", {
|
const { success } = await Deno.spawn("cargo", {
|
||||||
args: cmd,
|
args: [...cmd, "--", "-D", "warnings"],
|
||||||
stdout: "inherit",
|
stdout: "inherit",
|
||||||
stderr: "inherit",
|
stderr: "inherit",
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue