lint: allow print_stdout and print_stderr

This commit is contained in:
Weihang Lo 2023-09-12 11:28:15 +08:00
parent 870f9ea7b3
commit 7a4754a1d3
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7
13 changed files with 26 additions and 0 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -1,3 +1,5 @@
#![allow(clippy::print_stderr)]
use anyhow::{bail, format_err, Context, Error};
use mdman::{Format, ManMap};
use std::collections::HashMap;

View File

@ -1,3 +1,5 @@
#![allow(clippy::print_stderr)]
use std::cell::RefCell;
use std::cmp::PartialEq;
use std::cmp::{max, min};

View File

@ -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;

View File

@ -10,6 +10,8 @@
//! For more, read their doc comments.
//! ```
#![allow(clippy::print_stderr)]
use std::fs;
use std::io;
use std::path::PathBuf;

View File

@ -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;

View File

@ -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,

View File

@ -1,5 +1,7 @@
//! Cargo registry macos keychain credential process.
#![allow(clippy::print_stderr)]
#[cfg(target_os = "macos")]
mod macos {
use cargo_credential::{

View File

@ -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;

View File

@ -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;

View File

@ -1,4 +1,6 @@
#![allow(clippy::disallowed_methods)]
#![allow(clippy::print_stderr)]
#![allow(clippy::print_stdout)]
#[macro_use]
extern crate cargo_test_macro;