I tried using clang-format on entire files and I noticed two things (there might be others, I didn't look too closely):

1) When it reformats comments to fit in the line length, it just inserts linebreaks rather than rewrapping the text. So you end
up
with text like this, where the last couple of words get wrapped
onto
the next line.

2) It didn't handle things like MOZ_BEGIN_NESTED_ENUM_CLASS properly.

I was just using -style=Mozilla and maybe that's not the right thing to use? I also don't know how much leeway we have to modify what it does for cases like these.

kats

On 22/5/2014, 21:29, Anthony Jones wrote:
Some of you may remember the discussion on clang-format and the `mach
clang-format` command. What we have in place right now is very temporary
but it is functional enough to give it a try. I have not put the effort
into upstreaming my changes. Depending on the feedback I receive I will
either:

* Finish my existing changes and upstream them
* Remove the `mach clang-format` command altogether
* Do nothing

I have personally found it useful. However I would like to hear from
other people who have tried it to help me decide what to do next.

Anthony


_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to