Skip to content

Commit

Permalink
refactor(semantic): reformat transform checker errors (#5039)
Browse files Browse the repository at this point in the history
Reformat transform checker error output - shorter and consistent capitalization.
  • Loading branch information
overlookmotel committed Aug 21, 2024
1 parent 47029c4 commit 586e15c
Show file tree
Hide file tree
Showing 7 changed files with 19,273 additions and 19,273 deletions.
18 changes: 9 additions & 9 deletions crates/oxc_semantic/src/post_transform_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ impl PostTransformChecker {
{
let message = format!(
"
Bindings Mismatch:
previous scope {prev_scope_id:?}: {prev_bindings:?}
current scope {cur_scope_id:?}: {current_bindings:?}
Bindings mismatch:
previous {prev_scope_id:?}: {prev_bindings:?}
current {cur_scope_id:?}: {current_bindings:?}
"
);
self.errors.push(OxcDiagnostic::error(message.trim().to_string()));
Expand Down Expand Up @@ -149,9 +149,9 @@ current scope {cur_scope_id:?}: {current_bindings:?}
if prev_symbol_name != cur_symbol_name {
let message = format!(
"
Symbol Mismatch:
previous symbol {prev_symbol_id:?}: {prev_symbol_name:?}
current symbol {cur_symbol_id:?}: {cur_symbol_name:?}
Symbol mismatch:
previous {prev_symbol_id:?}: {prev_symbol_name:?}
current {cur_symbol_id:?}: {cur_symbol_name:?}
"
);
self.errors.push(OxcDiagnostic::error(message.trim().to_string()));
Expand Down Expand Up @@ -196,9 +196,9 @@ current symbol {cur_symbol_id:?}: {cur_symbol_name:?}
if prev_symbol_name != cur_symbol_name {
let message = format!(
"
reference Mismatch:
previous reference {prev_reference_id:?}: {prev_symbol_name:?}
current reference {cur_reference_id:?}: {cur_symbol_name:?}
Reference mismatch:
previous {prev_reference_id:?}: {prev_symbol_name:?}
current {cur_reference_id:?}: {cur_symbol_name:?}
"
);
self.errors.push(OxcDiagnostic::error(message.trim().to_string()));
Expand Down
Loading

0 comments on commit 586e15c

Please sign in to comment.