@@ -179,7 +179,6 @@ impl Rule for DisplayName {
179179 continue ; // Name is valid displayName
180180 }
181181
182- // Check if this symbol has a displayName assignment via semantic references
183182 if !has_display_name_via_semantic ( symbol_id, component_info. name . as_ref ( ) , ctx) {
184183 components_to_report. push ( ( component_info. span , component_info. is_context ) ) ;
185184 }
@@ -192,12 +191,10 @@ impl Rule for DisplayName {
192191 check_context_assignment_references ( symbol_id, decl_node, ctx)
193192 } ) ;
194193
195- if let Some ( component_info) = context_assignment_info {
196- // Check if this symbol has a displayName assignment
197- if !has_display_name_via_semantic ( symbol_id, component_info. name . as_ref ( ) , ctx)
198- {
199- components_to_report. push ( ( component_info. span , component_info. is_context ) ) ;
200- }
194+ if let Some ( component_info) = context_assignment_info
195+ && !has_display_name_via_semantic ( symbol_id, component_info. name . as_ref ( ) , ctx)
196+ {
197+ components_to_report. push ( ( component_info. span , component_info. is_context ) ) ;
201198 }
202199 }
203200 }
@@ -355,7 +352,6 @@ fn has_display_name_via_semantic(
355352) -> bool {
356353 let component_name_str = component_name. map ( CompactStr :: as_str) ;
357354
358- // Check all references to this symbol
359355 for reference in ctx. scoping ( ) . get_resolved_references ( symbol_id) {
360356 if is_display_name_assignment_for_reference ( reference, component_name_str, ctx) {
361357 return true ;
@@ -383,7 +379,6 @@ fn check_context_assignment_references(
383379 None
384380 } ;
385381
386- // Check all write references to this symbol
387382 for reference in ctx. scoping ( ) . get_resolved_references ( symbol_id) {
388383 if !reference. is_write ( ) {
389384 continue ;
@@ -426,7 +421,6 @@ fn is_react_component_node<'a>(
426421 // That will be handled by checking write references in Phase 1
427422 decl. init . as_ref ( ) ?;
428423
429- // Check for createContext
430424 if let Some ( Expression :: CallExpression ( call) ) = & decl. init
431425 && is_create_context_call ( call)
432426 {
@@ -477,7 +471,6 @@ fn is_react_component_node<'a>(
477471 } ) ;
478472 }
479473
480- // Check for createReactClass
481474 if callee_name == "createClass" || callee_name == "createReactClass" {
482475 if !has_create_react_class_display_name ( call, ignore_transpiler_name) {
483476 return Some ( ReactComponentInfo {
0 commit comments