DISCLAIMERS:
- This plugin modifies the source of your script and any changes made cannot be undone (at least conveniently). This may change if I can finally figure out the craziness which is Roblox’s undo system.
- As the person who wrote this plugin and tested it I myself do not have complete faith in the reliability of this plugin. By using this plugin you accept the risk that your code may become damaged and malformed during use.
- This plugin will not convert a script if it detects the presence of typed Luau.
What is CaseConvert?
CaseConvert is a plugin that allows you to work with other programmers code at ease and can even be used to tidy up your variable names meaning you can… wait for it… read your old code!!!. It does this by using a lexer to collect local variables in a script which are then converted to your desired programming case and inserted into the script.
Here is an example in the plugin to show me making code written by a lunatic more readable:
How do I get this?
You can install this plugin from the Roblox website here:
https://www.roblox.com/library/8478933793/Case-Convert
Credits:
While I would love to take all the credit for this truly life changing plugin, I am merely a man standing on the shoulder of the giants which are:
@boatbomber - Who made the lexer and module that that collects and gives types to all the variables gathered by the lexer.
@jaschutte - Who created the logic for gathering a list of words from a variable name in addition to the code for identifying luau generics.
Without either of them this project simply would not have been possible so a huge thank you to them.
Final notes:
As I alluded to in the disclaimers section of this post, I do not have complete confidence in this module so if you do come across any bugs, firstly I apologise, but please do let me know and I will try to fix it as soon as I can.
I do want people to understand though that any bugs are not from my lack of trying to quash them, out of the 3 day development cycle of this plugin, I spent 2 days and at least 10 hours working with Jaschutte to try and refine the module to the point where at the time of releasing there are no bugs, big or small, that I am actively aware of.
In regards to the future of the plugin I want to add a way to modify your automatic preferences so you can e.g. set constants to UPPER_SNAKE and variables to pascal. I also want to apply the changes to function arguments and improve performance.