Solar2D-FormatterSolar2D-Formatter is Visual Studio Code extension designed to be used for development of Solar2D apps. Majority of lua formatters are not compatible with Solar2D code style as shown in its official documentation and examples. FeaturesAdds missing spaces - for example: Release Notes1.0.0Initial release: November 2024 Project structureImplementation of the formatter is in the file extension.js. Tests are in the tests folder and are divided into singleLine test, that checks proper formatting of a checkLine function, and into multipleLines test, that tests checkAllLines function. Since checkAllLines function calls checkLine function for each line, both tests differ only in the abstraction level. This means that multiLine tests are closer approximation of what the user is doing and therefore are more valuable. SingleLine tests still help with quicker identification of regression bugs, however since they are implementation tests, feel free to rewrite them or even delete them if the implementation changes significantly. Useful commandsRun the tests with:
|