Benzammour / cretro

👾 cretro - Yet another Chip 8 Emulator!
MIT License
4 stars 2 forks source link

Provide .clang-format & .clang-tidy #13

Open marcluque opened 1 year ago

marcluque commented 1 year ago

This makes the coding style for the project consistent. Could be combined with a simple script or even local commit hook that runs it for all files.

marcluque commented 1 year ago

I could make a proposal for a clang-format file. But I'd wait for #10 to be finished to not run into any struggles with merges.

marcluque commented 1 year ago

Just a quick question for that. Should we use tabs or spaces for indentation? In the latter case, how many?

marcluque commented 1 year ago

I've also noticed that the naming conventions are a bit inconsistent. Is there any specific rule that should be followed? I think that clang-tidy can enforce naming conventions. Just as an example camelCase vs snake_case for variables and struct members.