You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/02 10:27:44 UTC
[GitHub] [apisix] fundon opened a new pull request, #8233: chore(fmt): stylua
fundon opened a new pull request, #8233:
URL: https://github.com/apache/apisix/pull/8233
### Description
Use [`stylua`](https://github.com/JohnnyMorganz/StyLua) to format codes.
```shell
stylua -g '*.lua' -- .
```
Some projects use it.
* [neovim](https://github.com/neovim/neovim)
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [ ] I have explained the changes or the new features added to this PR
- [ ] I have added tests corresponding to this change
- [ ] I have updated the documentation to reflect this change
- [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tokers commented on pull request #8233: chore(fmt): stylua
Posted by GitBox <gi...@apache.org>.
tokers commented on PR #8233:
URL: https://github.com/apache/apisix/pull/8233#issuecomment-1300006050
Those changes will break the git blame result. I'm afraid the benefits are small.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] fundon commented on pull request #8233: chore(fmt): stylua
Posted by GitBox <gi...@apache.org>.
fundon commented on PR #8233:
URL: https://github.com/apache/apisix/pull/8233#issuecomment-1301606428
我想主要问题还是会破坏 git blame 结果,对提交者非常不友好,另外是历史遗留问题,语言没内置 fmt 工具。
但如果有一定的代码规范的约定的话,对项目还是有一点点助理。:)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] fundon commented on pull request #8233: chore(fmt): stylua
Posted by GitBox <gi...@apache.org>.
fundon commented on PR #8233:
URL: https://github.com/apache/apisix/pull/8233#issuecomment-1301406195
I think it is possible to unify the style in a progressive way.
When a particular developer makes changes to a file, the file can be formatted last.
```shell
stylua a.lua
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on pull request #8233: chore(fmt): stylua
Posted by GitBox <gi...@apache.org>.
spacewander commented on PR #8233:
URL: https://github.com/apache/apisix/pull/8233#issuecomment-1301533649
Enforcing a code style in Lua code is not a good idea as there is no standard in the Lua world. And we don't want to force every developer to use an X formatter.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed pull request #8233: chore(fmt): stylua
Posted by GitBox <gi...@apache.org>.
spacewander closed pull request #8233: chore(fmt): stylua
URL: https://github.com/apache/apisix/pull/8233
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org