Skip to content

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