coala / coala-bears

Bears for coala
https://coala.io/
GNU Affero General Public License v3.0
294 stars 580 forks source link

clang-format integration #328

Open sils opened 8 years ago

sils commented 8 years ago

http://clang.llvm.org/docs/ClangFormat.html

Do we want that? How does it relate to just GNU format?

status/needs design

gitmate-bot commented 8 years ago

Thanks for reporting this issue!

Your aid is required, fellow coalaian. Help us triage and solving this issue!

CC @sils1297, @AbdealiJK

jmc-88 commented 7 years ago

I'm assuming you mean GNU indent here, as I'm unaware of what GNU format is and couldn't find any pointers for it:

  1. Yes, you want that. GNU indent is targeted at C source code (from the manual: "indent: Indent and Format C Program Source"), while clang-format supports several different languages.
  2. GNU indent hasn't seen a release in about 8 years (check the timestamps: mirror link), while clang-format is under active development.

It should hopefully be trivial to write a bear that wraps around the clang-format binary, with the following caveats:

sils commented 7 years ago

@jmc-88 thanks a lot for the analysis! Removing needs design as it's crystal clear why and what we want IMO.

With cEP-0005 we will actually want to turn most of those options into aspects long term even though it will be a lot of work.

StanleySweet commented 4 years ago

I created a version here, will probably make a PR at some point https://code.wildfiregames.com/D2490