Skip to content

Commit

Permalink
lint: allow print_stdout and print_stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Sep 15, 2023
1 parent 778f398 commit 90d39f4
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions benches/capture/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
//! The workspace will be saved in a `.tgz` file in the `../workspaces` directory.
#![allow(clippy::disallowed_methods)]
#![allow(clippy::print_stderr)]

use flate2::{Compression, GzBuilder};
use std::fs;
Expand Down
2 changes: 2 additions & 0 deletions crates/cargo-platform/examples/matches.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//! This example demonstrates how to filter a Platform based on the current
//! host target.
#![allow(clippy::print_stdout)]

use cargo_platform::{Cfg, Platform};
use std::process::Command;
use std::str::FromStr;
Expand Down
2 changes: 2 additions & 0 deletions crates/cargo-test-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
//! See <https://rust-lang.github.io/cargo/contrib/> for a guide on writing tests.
#![allow(clippy::disallowed_methods)]
#![allow(clippy::print_stderr)]
#![allow(clippy::print_stdout)]

use std::env;
use std::ffi::OsStr;
Expand Down
2 changes: 2 additions & 0 deletions crates/mdman/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::print_stderr)]

use anyhow::{bail, format_err, Context, Error};
use mdman::{Format, ManMap};
use std::collections::HashMap;
Expand Down
2 changes: 2 additions & 0 deletions crates/resolver-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::print_stderr)]

use std::cell::RefCell;
use std::cmp::PartialEq;
use std::cmp::{max, min};
Expand Down
2 changes: 2 additions & 0 deletions crates/semver-check/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
//! - `dont-deny`: By default tests have a `#![deny(warnings)]`. This option
//! avoids this attribute. Note that `#![allow(unused)]` is always added.
#![allow(clippy::print_stderr)]

use std::error::Error;
use std::fs;
use std::path::Path;
Expand Down
2 changes: 2 additions & 0 deletions crates/xtask-build-man/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
//! For more, read their doc comments.
//! ```
#![allow(clippy::print_stderr)]

use std::fs;
use std::io;
use std::path::PathBuf;
Expand Down
2 changes: 2 additions & 0 deletions crates/xtask-stale-label/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
//! Probably autofix them in the future.
//! ```
#![allow(clippy::print_stderr)]

use std::fmt::Write as _;
use std::path::PathBuf;
use std::process;
Expand Down
1 change: 1 addition & 0 deletions credential/cargo-credential-1password/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! Cargo registry 1password credential process.
#![allow(clippy::disallowed_methods)]
#![allow(clippy::print_stderr)]

use cargo_credential::{
Action, CacheControl, Credential, CredentialResponse, Error, RegistryInfo, Secret,
Expand Down
2 changes: 2 additions & 0 deletions credential/cargo-credential-macos-keychain/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
//! Cargo registry macos keychain credential process.
#![allow(clippy::print_stderr)]

#[cfg(target_os = "macos")]
mod macos {
use cargo_credential::{
Expand Down
3 changes: 3 additions & 0 deletions credential/cargo-credential/examples/stdout-redirected.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//! Provider used for testing redirection of stdout.
#![allow(clippy::print_stderr)]
#![allow(clippy::print_stdout)]

use cargo_credential::{Action, Credential, CredentialResponse, Error, RegistryInfo};

struct MyCredential;
Expand Down
3 changes: 3 additions & 0 deletions credential/cargo-credential/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
#![doc = include_str!("../examples/file-provider.rs")]
//! ```
#![allow(clippy::print_stderr)]
#![allow(clippy::print_stdout)]

use serde::{Deserialize, Serialize};
use std::{fmt::Display, io};
use time::OffsetDateTime;
Expand Down
2 changes: 2 additions & 0 deletions tests/testsuite/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#![allow(clippy::disallowed_methods)]
#![allow(clippy::print_stderr)]
#![allow(clippy::print_stdout)]

#[macro_use]
extern crate cargo_test_macro;
Expand Down

0 comments on commit 90d39f4

Please sign in to comment.