Skip to content

[Types] bracket accessors removed#29

Draft
keithharvey wants to merge 1 commit intofmtfrom
mig-bracket
Draft

[Types] bracket accessors removed#29
keithharvey wants to merge 1 commit intofmtfrom
mig-bracket

Conversation

@keithharvey
Copy link
Copy Markdown
Owner

@keithharvey keithharvey commented Mar 26, 2026

Commands

Demonstrates running bar-lua-codemod with:

# bracket-to-dot - convert x["y"] to x.y and ["y"] = to y =
bar-lua-codemod bracket-to-dot --path "$BAR_DIR" --exclude common/luaUtilities

Output Summary

bar-lua-codemod bracket-to-dot results:
  Files scanned:                           2,364
  Files changed:                             344
  Index conversions (x["y"] -> x.y):    5,053
  Field conversions (["y"] = -> y =):    3,450
  Total conversions:                     8,503
  Skipped (reserved words):                 14
  Errors (parse failures):                   0

Top files by conversion count:
  luarules/configs/scav_spawn_defs.lua                           948
  luaui/configs/buildmenu_sorting.lua                            650
  luaui/configs/DeferredLightsGL4config.lua                      605
  effects/custom_explosions.lua                                  489
  luaui/Widgets/gui_options.lua                                  432
  effects/nukes.lua                                              275
  luarules/configs/critters.lua                                  235
  luaui/Widgets/gui_top_bar.lua                                  172
  luarules/configs/raptor_spawn_defs.lua                         153
  luaui/Widgets/gui_defenserange_gl4.lua                         135
  luaui/Widgets/gui_pip.lua                                      135
  luaui/Widgets/gui_advplayerslist.lua                           128
  luarules/gadgets/unit_continuous_aim.lua                       127
  luaui/configs/DistortionGL4Config.lua                          112
  luaui/configs/DistortionGL4WeaponsConfig.lua                   103
  luaui/configs/DeferredLightsGL4WeaponsConfig.lua                93
  units/other/evocom/armcorevodecom.lua                           93
  luaui/configs/airjet_effects.lua                                88
  luaui/Widgets/snd_notifications_addon_scavraptorstatus.lua      84
  luarules/gadgets/unit_juno_damage.lua                           77

Branch Topology

All branches are generated from branch by just bar::fmt-mig-generate.

Leaf branches (each isolates one transform on top of fmt):

Branch Transform Diff
fmt stylua . (base) 1415 files, +177785 −182643 vs stylua
mig-bracket bracket-to-dot 348 files, +7638 −7649 vs fmt
mig-rename-aliases rename-aliases 169 files, +359 −370 vs fmt
mig-detach-bar-modules detach-bar-modules 169 files, +1527 −1538 vs fmt
mig-spring-split spring-split 756 files, +9510 −9517 vs fmt

Linear branch (all transforms applied sequentially — this is what merges):

Branch Commits Diff vs stylua
mig fmtbracket-to-dotrename-aliasesdetach-bar-modulesspring-split 1427 files, +186612 −191465

@keithharvey keithharvey changed the title [Types] generative murder bracket accessors [Types] bracket accessors removed Mar 26, 2026
@keithharvey keithharvey force-pushed the mig-bracket branch 2 times, most recently from fa84eb5 to c1ba033 Compare March 27, 2026 04:45
@keithharvey keithharvey force-pushed the mig-bracket branch 2 times, most recently from c438888 to 7ecb769 Compare March 27, 2026 05:28
@keithharvey keithharvey force-pushed the fmt branch 2 times, most recently from bb444af to d2e0f7a Compare March 28, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant