Skip to content

Code format #185

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

Merged
merged 6 commits into from
Feb 16, 2025
Merged

Code format #185

merged 6 commits into from
Feb 16, 2025

Conversation

konsumer
Copy link
Collaborator

@konsumer konsumer commented Feb 16, 2025

This adds prettier & clang-format to help automate code-consistency. I am not really stuck on the style for either language, so feel free to modify, I just want it to be automated & consistent. The prettier style mimics standardjs, and the clang-format is as similar as I could get it for C. For many editors (VSCode/Zed, or sublime with a plugin) this will automate fixing code (just save and it will be correct.)

@konsumer konsumer mentioned this pull request Feb 16, 2025
@konsumer
Copy link
Collaborator Author

konsumer commented Feb 16, 2025

This fails style-check (correctly, because the code does not follow standards) but a quick fix in another commit:

npx -y prettier -c . --write

@konsumer
Copy link
Collaborator Author

konsumer commented Feb 16, 2025

I am using all prettier here, because biome (which is faster) is blocked by .editorconfig. It's a pretty small difference in speed anyway, but it does not like some of the options in our .editorconfig. Zed uses biome, as far as I know, so I am not sure why it doesn't fail there, but it's probly a safer bet to use prettier, anyway, since it's more mature.

@RobLoach RobLoach merged commit e3d3cf4 into master Feb 16, 2025
4 of 6 checks 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.

2 participants