xcompact3d / x3d2

https://xcompact3d.github.io/x3d2
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Change indentation from 3 to 2 using fprettify. #81

Closed semi-h closed 5 months ago

semi-h commented 5 months ago

Just wanted to see how fprettify would handle what we want. Only changed the indentation in our config file and run the fprettify in place. I think fprettify gets very annoyed when line length is > 79, and results in a funny indentation.

And fprettify doesn't touch comments starting with !!, so almost all of them are wrongly indented.

semi-h commented 5 months ago

I did some further tests and with the last 2 commits in the PR, running fprettify in the whole codebase doesn't introduce any errors or changes, meaning that the current state is fully compatible with our fprettify settings. Also, I wasn't able to observe any buggy indentation anywhere in the codebase in its current state. To get here:

Although I haven't observed any buggy indentation in the current state, there are two things we need to be aware of

Nanoseb commented 5 months ago

We probably want to update the documentation/coding style to mention the !& syntax and the change to 2 spaces instead of 3

semi-h commented 5 months ago

Added !& to the documentation. For the style preferences documentation refers to .fprettify.ini in the root folder, doesn't explicitly state the indentation level.