add formatting#132
Conversation
These should ensure consitent formatting in the future. Feel free to modify the stylua.toml to your liking. I tried to keep it consistent with our current style (especially the tab-based indention)
|
This is an implementation of this: #131 (comment) |
amirbilu
left a comment
There was a problem hiding this comment.
This looks good. Do we really need both format and push and check on PR? Usually you pick one of them. No?
|
My thought process was that having a check on PRs encourages (but doesn't require?) contributors to run a formatter on their changes code to get the green check, thusly reducing diff sizes. If you don't like this idea, I can remove the PR check and leave only the format-on-push. |
|
With most Tabnine repos we just perform format check upon PR |
So, to be clear, you don't want the auto-formatting at all? Just a check on new PRs? Wouldn't it slightly defeat the purpose of having a format workflow if it is still delegated to the contributor in all cases? Additionally, wouldn't that have the potential to create further merge conflicts, since if a formatting mistake makes it to master (through a direct commit), it would then have to be fixed in every PR following, until one is merged? |
|
With other repos we only check, but make it a required workflow. Which
means you cannot merge if gou haven't applied formatting
…On Mon, Nov 6, 2023, 15:08 Aaron Dill ***@***.***> wrote:
With most Tabnine repos we just perform format check upon PR
So, to be clear, you don't want the auto-formatting at all? Just a check
on new PRs? Wouldn't it slightly defeat the purpose of having a format
workflow if it is still delegated to the contributor in all cases?
Additionally, wouldn't that have the potential to create *further* merge
conflicts, since if a formatting mistake makes it to master (through a
direct commit), it would then have to be fixed in every PR following, until
one is merged?
—
Reply to this email directly, view it on GitHub
<#132 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2TIGD3XQUUHIAJV4NIVRTYDDOLDAVCNFSM6AAAAAA66TFSP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJUG44TCNBUGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
As requested by @amirbilu
d4dad02 to
b51cd7b
Compare
|
Made this check mandatory |
chore: add formatting workflow and stylua.toml
These should ensure consitent formatting in the future.
Feel free to modify the stylua.toml to your liking. I tried to keep it consistent with our current style (especially the tab-based indention)