[Qt-creator] Tabs vs Spaces?
bryan.bennetts at gmail.com
Fri Mar 6 22:40:29 CET 2020
You can use git smudge and clean filters so that local versions appear to
have spaces, but the remote has tabs. Having said that, I've fiddled with
them in the past for formatting they are a little scary IMHO.
Best plan is just to choose a format and get everyone to use it, regardless
of personal preference. 'this is the project format - suck it up.'
As the others have said clang-format is a popular formatter at the moment,
and is quite nicely integrated in QTC.
There are more than a few pre and post commit hooks out out on the Web to
auto clang format to the configuration in the root of the project
directory, the only shortfall I've seen in some is that they fail to format
the working version at the same time so the dev will see a difference
between the working version and the committed version that they might not
On Fri, 6 Mar 2020, 16:38 Jason H, <jhihn at gmx.com> wrote:
> I am a tabs guy. I change the Qt style to use tabs. I tab all the things!!
> Anyway, I now have other contributors to my project that are spaces
> people. How can we live in harmony? One side effect is that it seems git
> considers whitespace changes so his code is indented with spaces, mine are
> tabs and it's making a mess in git.
> Or should this be handled by git? (And if so, how?)
> Qt-creator mailing list
> Qt-creator at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qt-creator