Skip to content

Code format - #185

Merged
RobLoach merged 6 commits into
masterfrom
code-format
Feb 16, 2025
Merged

Code format#185
RobLoach merged 6 commits into
masterfrom
code-format

Conversation

@konsumer

@konsumerkonsumer commented Feb 16, 2025

Copy link
Copy Markdown
Collaborator

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.)

@konsumerkonsumer mentioned this pull request Feb 16, 2025
@konsumer

konsumer commented Feb 16, 2025

Copy link
Copy Markdown
CollaboratorAuthor

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

konsumer commented Feb 16, 2025

Copy link
Copy Markdown
CollaboratorAuthor

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 masterFeb 16, 2025
Sign up for freeto 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

@konsumer@RobLoach