sammccall added a comment.

In https://reviews.llvm.org/D50147#1279056, @Typz wrote:

> In https://reviews.llvm.org/D50147#1272742, @sammccall wrote:
>
> > The idea here does seem to be a natural extension of -style, at least for 
> > the case when the arg is a filename directly. I'm not opposed, happy to 
> > review this.
> >
> > I do want to probe the use case a bit though: we have found that 
> > configuring via -style= doesn't scale that well to lots of codebases and 
> > tools. e.g. if someone's running clang-tidy or clangd via some driver, are 
> > they going to have a way to plumb through the right -style=?
> >
> > Being able to discover the right style from the filesystem is powerful, and 
> > if I was going to use this flag, I'd consider symlinking the style-file to 
> > `subproject/.clang_format` instead. That way the setting is persistent and 
> > available to all tools, rather than us needing to get it right on each 
> > invocation.
>
>
> I totally agree: using '-style' does not scale well. However this patch works 
> also when the style is used in the 'basedOn' tag. This is actually the way we 
> expect to use this: store a small .clang_format file in each repo, which 
> simply references a clang-format file which must be installed (manually, for 
> now) on each user's computer.


`BasedOn: "/path/to/some/file"` would certainly work; but why not just use a 
symlink?


Repository:
  rC Clang

https://reviews.llvm.org/D50147



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to