Skip to content
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

mention code formatting in contribution guidelines #5514

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

expipiplus1
Copy link
Collaborator

Closes #5511

@expipiplus1 expipiplus1 self-assigned this Nov 7, 2024
@expipiplus1 expipiplus1 requested a review from a team as a code owner November 7, 2024 12:04
@expipiplus1 expipiplus1 added this to the Q1 2025 (Winter) milestone Nov 7, 2024
/* end */
```
If you open a pull request and the formatting is incorrect, you can comment
`/format` and a bot will format your code for you.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should explain that a PR will be created and you need to merge that PR.

@jkwak-work
Copy link
Collaborator

Is there a way to run the formatting my local machine? I personally prefer to get is done before presenting it to others as a review.


Open a pull request against `shader-slang/slang`.

Code formatting can be automatically fixed on your branch by commenting `/format`, a bot will proceed to open a PR targeting *your* branch.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The formatting is a required process not an optional step. I think we should describe that the generated PR needs to be merged here as Yong pointed out on the other spot.

Copy link
Collaborator

@jkwak-work jkwak-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@csyonghe
Copy link
Collaborator

csyonghe commented Nov 8, 2024

@jkwak-work You can configure VisualStudio or VSCode to perform formatting on save.

In visual studio it is called Code Cleanup:
image

You also need to set code formatter to clang-format.

Once configured, you will never need to worry about formatting any more.

@csyonghe csyonghe merged commit 98dab05 into shader-slang:master Nov 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update contribution.md to include instructions to use the formatting bot
3 participants