biome icon indicating copy to clipboard operation
biome copied to clipboard

refactor(codemod/biome_js_analyze): remove manual construction of `JsRuleAction`

Open dyc3 opened this issue 1 year ago • 2 comments

Summary

This is a follow up to #2820.

Related to: #2799

Test Plan

It compiles, tests pass.

dyc3 avatar May 15 '24 15:05 dyc3

CodSpeed Performance Report

Merging #2874 will not alter performance

Comparing dyc3:05-12-refactor_codemod_biome_js_analyze_remove_manual_construction_of_jsruleaction_ (243c60c) with main (d9e1873)

Summary

✅ 99 untouched benchmarks

codspeed-hq[bot] avatar May 15 '24 15:05 codspeed-hq[bot]

CI is failing due to clippy error

ematipico avatar May 15 '24 17:05 ematipico

cc @dyc3

ematipico avatar May 16 '24 10:05 ematipico

Fixed in https://github.com/biomejs/biome/commit/7bcc112067a6fdb7c4dc48056c9d49b7dbbcf51d

ematipico avatar May 16 '24 10:05 ematipico

Whoops, my bad. It was definitely because I find/replaced that text. Do you have a better way of doing these kinds of large codemods? I'm not aware of any tools that do that

dyc3 avatar May 16 '24 11:05 dyc3

Whoops, my bad. It was definitely because I find/replaced that text. Do you have a better way of doing these kinds of large codemods? I'm not aware of any tools that do that

I've never used it in repos like biome but you can try gritql which is also what biome plans to use to support plugins.

Anyway these kind of errors are supposed to be catched by tests, it's just a limitation of our current setup (main repo + website repo codegen) which makes these kind of errors more difficult to avoid.

Sec-ant avatar May 16 '24 11:05 Sec-ant