Closed rajeshchinnam closed 1 month ago
Hi Thanks in advance
I have below tree sitter query
remove_test_annotated_methods = Rule( name="remove_test_annotated_methods", query=""" (method_declaration (modifiers (marker_annotation name: (identifier) @annotation_name ) ) name: (identifier) @method_name body: (block) @method_body ) (#eq? @annotation_name "Test") """, replace_node="method_declaration", replace="", is_seed_rule=True )
and I want to find the method and remove
@Test void testMethod() { when(tenantConfiguration.get(TenantConfigurationKey.FEATURE_SEQUENTIAL_NUMBERS_FOR_WARRANTY)).thenReturn("false"); }
but this rule not working can you please tell me what could be the issue and how to debug
Hi Thanks in advance
I have below tree sitter query
remove_test_annotated_methods = Rule( name="remove_test_annotated_methods", query=""" (method_declaration (modifiers (marker_annotation name: (identifier) @annotation_name ) ) name: (identifier) @method_name body: (block) @method_body ) (#eq? @annotation_name "Test") """, replace_node="method_declaration", replace="", is_seed_rule=True )
and I want to find the method and remove
@Test void testMethod() { when(tenantConfiguration.get(TenantConfigurationKey.FEATURE_SEQUENTIAL_NUMBERS_FOR_WARRANTY)).thenReturn("false"); }
but this rule not working can you please tell me what could be the issue and how to debug