On Sun, Mar 8, 2020 at 9:30 AM Gregory Nutt <spudan...@gmail.com> wrote: > > > > Since there's no current maintainer for nxstyle... What would people think > > about trying Clang-Format <http://clang.llvm.org/docs/ClangFormat.html>? > > > > It's a well-used tool (LLVM, Google, Chromium, Mozilla, Webkit, and > > Microsoft <http://clang.llvm.org/docs/ClangFormatStyleOptions.html>), and > > can be configured for many different style guides... it should be possible > > to configure it for NuttX's style guide. Or at least get close. > > > > If there's interest, I can take a shot at trying to configure it using the > > NuttX style guide. If we went that direction, we'd have another tool to > > install. But then we'd only have to maintain a configuration, and we'd be > > joining a big community who are all using this same tool. > > > > What do you think? > > We have already tried indent, astyle, and uncrustify and were not happy > with them. There are starts already in tools/. Of those, indent > probably works the same. > > A tool that produces absolutely perfect output would be useful. But even > the tiniest of bugs make the tool useless. > > My guess is that you will fail. Everyone else has. So cannot in good > faith encourage you. > > But if you create the perfect tool that does everything 100% correctly, > I suppose you would be a hero. The acceptance test is this: > > You run the program against all .c and .h files under sched and the > output is 100% compatible with the input you win. One byte different > you lose. Hundreds hours have gone into this challenge and all have failed.
assuming that a tool has --try-run/--check-only, i suppose it doesn't need to be that perfect to replace nxstyle. > > Greg