d-iii-s / msim

Light-weight MIPS R4000 and RISC-V system simulator
https://d3s.mff.cuni.cz/software/msim/
GNU General Public License v2.0
5 stars 5 forks source link

Enforce C style #51

Closed vhotspur closed 10 months ago

vhotspur commented 11 months ago

Convert to a unified C style (enforcing new rules in each commit) with CI-enforced checks.

Changes applied and enforced:

lbulej commented 11 months ago

Can I play with .clang-format settings too? :-)

vhotspur commented 11 months ago

Can I play with .clang-format settings too? :-)

Are you in such hurry? I still have some stashed changes and I am adding the rules slowly so that I can still reasonably review that the automated formatting have not broken anything.

And no, there will be no spaces in function calls ;-).

lbulej commented 11 months ago

Can I play with .clang-format settings too? :-)

Are you in such hurry? I still have some stashed changes and I am adding the rules slowly so that I can still reasonably review that the automated formatting have not broken anything.

Not really in hurry. I'm just asking for general permission to potentially chime in, because I don't like how clang formats some of the things :-)

And no, there will be no spaces in function calls ;-).

I would not dare... :-)

HanyzPAPU commented 11 months ago

I’m curious about how this change will handle some of the uglier parts of the code I’ve written (mostly the parts with C macros). Perhaps it would be better to refactor these part so they are written more reasonably.

lbulej commented 11 months ago

I’m curious about how this change will handle some of the uglier parts of the code I’ve written (mostly the parts with C macros). Perhaps it would be better to refactor these part so they are written more reasonably.

That's the plan after we clean up/unify/enforce formatting, so that refactoring is not mixed up with formatting changes.

vhotspur commented 10 months ago

I'm just asking for general permission to potentially chime in because I don't like how clang formats some of the things :-)

Now is the right time :-).

I think I have covered the most offensive parts (at least for me) and now the C style is enforced so things will only improve™.

Summary of changes

I would like to merge this before any further (functional) changes are made to prevent conflicts.