-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup lua linter and formatter #2
Comments
Agree! But how do we do that? |
just a idea, we ship a new binary called vfox-dev lint
vfox-dev build https://github.com/CppCXY/EmmyLuaCodeStyle there are some code styles linters, but most of them need user clone them and build them on machine. |
or we can use dprint, it is a pluggable and configurable code formatting platform written in rust. it has a lua plugin: https://github.com/RubixDev/dprint-plugin-stylua |
If we decide to use this, we can also implement a plug-in of our own. After taking a look, it is very easy. 😄 |
I don't think we need to spend too much time on this, |
ok, I will take a look on install dprint by vfox |
we can also use stylua and add its configuration to the root of the project: column_width = 120
line_endings = "Unix"
indent_type = "Tabs"
indent_width = 4
quote_style = "AutoPreferDouble"
call_parentheses = "Always"
collapse_simple_statement = "Never"
[sort_requires]
enabled = false |
yes, the dprint plugin we mentioned above in using |
unified code style can reduce the cost of maintaining and reviewing code, and can find potential risks
The text was updated successfully, but these errors were encountered: