Closed leeqvip closed 3 years ago
@techoner good idea, is there any linter tool we can utilize? Because it's hard to review PR with the coding guide just via human eyes.
https://github.com/mpeterv/luacheck this might be useful
@RobotHuang good, but how to integrate it into our pipeline? Like local test run, git commit hook run or GitHub Pull Request checks.
@hsluoyz https://github.com/RobotHuang/lua-action/blob/master/.github/workflows/main.yml#L37 this is a simple example. We also could use other's action, like https://github.com/marketplace/actions/luacheck
@RobotHuang good! Let's integrate it into this repo.
@rushitote any thoughts on this?
@hsluoyz I believe the two major styles we don't follow are:
Should we refactor it to follow LuaRocks or we follow our current style?
There's no hard requirement for Lua coding styles. For easier porting code from Go/Java to Lua, I think currently 4 spaces and camelCase sound OK for now.
I suggest that we should follow a coding style, such as : lua-style-guide.