Skip to content

Commit

Permalink
try to redact windows files only on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Feb 3, 2025
1 parent 31d7015 commit d2a2ed5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions crates/biome_diagnostics/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ impl<D: Diagnostic + ?Sized> fmt::Display for PrintHeader<'_, D> {
})?;
} else if is_jetbrains {
fmt.write_str(&format!(" at {name}"))?;
} else if cfg!(debug_assertions) && cfg!(windows) {
fmt.write_str(name.replace('\\', "/").as_str())?;
} else {
fmt.write_str(name)?;
}
Expand Down
6 changes: 3 additions & 3 deletions xtask/codegen/src/generate_analyzer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn generate_group(category: &'static str, group: &str, base_path: &Path) -> Resu
fn update_js_registry_builder(analyzers: BTreeMap<&'static str, TokenStream>) -> Result<()> {
let path = project_root().join("crates/biome_js_analyze/src/registry.rs");

let categories = analyzers.into_iter().map(|(_, tokens)| tokens);
let categories = analyzers.into_values();

let tokens = xtask::reformat(quote! {
use biome_analyze::RegistryVisitor;
Expand All @@ -277,7 +277,7 @@ fn update_js_registry_builder(analyzers: BTreeMap<&'static str, TokenStream>) ->
fn update_json_registry_builder(analyzers: BTreeMap<&'static str, TokenStream>) -> Result<()> {
let path = project_root().join("crates/biome_json_analyze/src/registry.rs");

let categories = analyzers.into_iter().map(|(_, tokens)| tokens);
let categories = analyzers.into_values();

let tokens = xtask::reformat(quote! {
use biome_analyze::RegistryVisitor;
Expand All @@ -297,7 +297,7 @@ fn update_json_registry_builder(analyzers: BTreeMap<&'static str, TokenStream>)
fn update_css_registry_builder(analyzers: BTreeMap<&'static str, TokenStream>) -> Result<()> {
let path = project_root().join("crates/biome_css_analyze/src/registry.rs");

let categories = analyzers.into_iter().map(|(_, tokens)| tokens);
let categories = analyzers.into_values();

let tokens = xtask::reformat(quote! {
use biome_analyze::RegistryVisitor;
Expand Down

0 comments on commit d2a2ed5

Please sign in to comment.