Replies: 6 comments 1 reply
-
Hi, It is 2 spaces just because I'm used to it :P, I use 2 spaces for c-style languages for more than 20yr. I'd rather not change that for the project as that will cause many changes which polute the git history. Adding a There are some small style differences as I changed the style a bit during development. I usually don't modify existing code, to keep the history clean. (When something breaks I usually check first what is changed recently.) I use VS code for developing both apps, works very well, it has a good cmake plugin. (Only thing I still neet to fix is debug info on Qt classes, that doesn't work out of the box) |
Beta Was this translation helpful? Give feedback.
-
Used clang-unformat to generate a I'll need to do one big fix commit to get everything formatted. After that we can keep the style correct :) |
Beta Was this translation helpful? Give feedback.
-
I've an issue with clang-format 14: I'd like:
I get:
or
I can't find an option to get it right, so I think the second option then is best (zero indent for access modifiers). |
Beta Was this translation helpful? Give feedback.
-
@gfgit I created a |
Beta Was this translation helpful? Give feedback.
-
Hi, very good news!
If you wait for the other PRs still open it would make things easier but it's fine either way.
Il 1 giugno 2024 00:49:40 CEST, Reinder Feenstra ***@***.***> ha scritto:
…
@gfgit I created a `.clang-tidy` file (and a script to apply it), see https://github.com/traintastic/traintastic/tree/clang-format
Still on a branch and didn't format all sources yet....it are really a lot of changes, that might give some headache with your dev branches. So we should choose a proper time to apply it :)
--
Reply to this email directly or view it on GitHub:
#42 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
It can wait, the script is there to do it quickly, so it can be done quickly once the moment is there :) |
Beta Was this translation helpful? Give feedback.
-
Hi, is the 2 space indentation needed to save disk space?
I usually make 4 spacing indentation which to me looks more readable because you clearly see the scope level.
Anyway Qt Creator is forcing 4 spaces even though I changed the settings so it's difficult to keep the code style consistent.
Maybe adding a
.clang-format
file which will uniquely choose the style and run it once in a while could be a good idea.Beta Was this translation helpful? Give feedback.
All reactions