1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

Desktop native disallow log crate macros (#17163)

This commit is contained in:
neuronull
2025-11-03 06:36:40 -08:00
committed by GitHub
parent c1dec4032e
commit 2b1dbb935f
4 changed files with 13 additions and 1 deletions

View File

@@ -454,7 +454,6 @@ dependencies = [
"tokio", "tokio",
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
"verifysign",
"windows 0.61.1", "windows 0.61.1",
] ]
@@ -621,6 +620,7 @@ dependencies = [
"tokio", "tokio",
"tracing", "tracing",
"tracing-subscriber", "tracing-subscriber",
"verifysign",
"windows 0.61.1", "windows 0.61.1",
] ]

View File

@@ -86,10 +86,13 @@ zbus_polkit = "=5.0.0"
zeroizing-alloc = "=0.1.0" zeroizing-alloc = "=0.1.0"
[workspace.lints.clippy] [workspace.lints.clippy]
disallowed-macros = "deny"
# Dis-allow println and eprintln, which are typically used in debugging. # Dis-allow println and eprintln, which are typically used in debugging.
# Use `tracing` and `tracing-subscriber` crates for observability needs. # Use `tracing` and `tracing-subscriber` crates for observability needs.
print_stderr = "deny" print_stderr = "deny"
print_stdout = "deny" print_stdout = "deny"
string_slice = "warn" string_slice = "warn"
unused_async = "deny" unused_async = "deny"
unwrap_used = "deny" unwrap_used = "deny"

View File

@@ -1,2 +1,10 @@
allow-unwrap-in-tests=true allow-unwrap-in-tests=true
allow-expect-in-tests=true allow-expect-in-tests=true
disallowed-macros = [
{ path = "log::trace", reason = "Use tracing for logging needs", replacement = "tracing::trace" },
{ path = "log::debug", reason = "Use tracing for logging needs", replacement = "tracing::debug" },
{ path = "log::info", reason = "Use tracing for logging needs", replacement = "tracing::info" },
{ path = "log::warn", reason = "Use tracing for logging needs", replacement = "tracing::warn" },
{ path = "log::error", reason = "Use tracing for logging needs", replacement = "tracing::error" },
]

View File

@@ -1,4 +1,5 @@
#![cfg(target_os = "macos")] #![cfg(target_os = "macos")]
#![allow(clippy::disallowed_macros)] // uniffi macros trip up clippy's evaluation
use std::{ use std::{
collections::HashMap, collections::HashMap,