Things may have advanced in the last year, but my recommendation is to just change the style (or submit a change to llvm) so that clang-format can be used. Its awesome.
Nate On Sun, Jan 31, 2016 at 5:23 AM, Andreas Sandberg <[email protected]> wrote: > Nilay posted a configuration file [1] about a year ago. I independently > had a look around that time as well. It seemed like a really good tool, > but it wasn’t possible to configure it to adhere to the gem5 style guide > at the time. > > IIRC, one of the problems at the time was that there were a few things in > the gem5 style guide that clang-format couldn’t handle. Judging by my > comment on RB, the issue was to do with indentation in switch statements > and I think there may have been issues with class declarations as well. > > //Andreas > > [1] http://reviews.gem5.org/r/2372/ > > > On 29/01/2016, 18:47, "gem5-dev on behalf of nathan binkert" > <[email protected] on behalf of [email protected]> wrote: > > >Have you guys played with clang-format? It's awesome and very > >configurable. You could consider at least running that on the whole > >codebase and then adding a prechangegroup hook on the server to reject > >pushes once it's done. > > > > Nate > > > >On Thu, Jan 28, 2016 at 10:14 AM, Steve Reinhardt <[email protected]> > >wrote: > > > >> On Thu, Jan 28, 2016 at 9:35 AM Andreas Sandberg > >><[email protected] > >> > > >> wrote: > >> > >> > > >> > You¹re probably right, rewrite is probably a better description. I > >> suspect > >> > we¹ll have to create some abstraction layer that allows us to extract > >> > diffs from both Mercurial and git if we want to keep the ability to > >>apply > >> > the style checker to a subset of a file. However, I¹m not sure if > >>that¹s > >> > desirable. I have had issues with the style checker (false positives > >>and > >> > negatives) due to the partial view in the past, so it might make > >>sense to > >> > apply it to the entire files instead of individual changes. > >> > > >> > >> Yes, doing whole files makes sense to me. We need to make a pass and > >>clean > >> up all the existing issues before we do that though. I'm planning to do > >> that anyway. > >> > >> Steve > >> _______________________________________________ > >> gem5-dev mailing list > >> [email protected] > >> http://m5sim.org/mailman/listinfo/gem5-dev > >> > >_______________________________________________ > >gem5-dev mailing list > >[email protected] > >http://m5sim.org/mailman/listinfo/gem5-dev > > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. > _______________________________________________ > gem5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/gem5-dev > _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
