Clang-Format, Clang-Tidy - Absolute Path to config files

via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 08:40:27 PDT 2020


Hi Francois,

I read your usecase. Our usecase is similar, but the difference is that we use Artifactory to store our tools and Conan to manage and install them. This way, having a Conan package with everything in it, including the config file is very scalable and maintainable.

I did not quite understand the last statement: “But as long as you are ready to recompile clang-format, it should work fine.” . I am a noob to contributing to open source software and I really do not know how to contribute, how to integrate the code. The idea would be to integrate this feature, so if we want to use future releases of Clang, they will also contain this feature and we will not need to integrate it again at every release.

Best regards,
Cezar

From: Typz <thetypz at gmail.com>
Sent: joi, 10 septembrie 2020 17:58
To: Diplasu Cezar (IFRO DCBUC ATV SC D DD) <Cezar.Diplasu at infineon.com>
Cc: cfe-commits at lists.llvm.org
Subject: Re: Clang-Format, Clang-Tidy - Absolute Path to config files

Caution: This e-mail originated outside Infineon Technologies. Do not click on links or open attachments unless you validate it is safe<http://iweb.infineon.com/en-US/Support/security/CDC/pse/Pages/pce.aspx>.


Hello,

I worked on adding a similar feature some time back : https://reviews.llvm.org/D50147
It supports specifying styles by absolute file name as well as lookup of a style by name in various locations (like ~/.local/share/clang-format or /usr/share/clang-format), allowing to install styles on the machine and use them similarly to "integrated" styles : e.g. reference them in BasedOnStyle tag or specify them via the --style parameter...

Unfortunately there was no consensus on this approach, and I did not get the time yet to finalize something that could be integrated. But as long as you are ready to recompile clang-format, it should work fine.
Best regards,

--
Francois

On Thu, Sep 10, 2020 at 2:28 PM via cfe-commits <cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>> wrote:
Hi all,


I have recently started to work with Clang-Format and Clang-Tidy tools as part of a methodology project in my company.
We want to have a uniform style and format in the entire department and for that we want to use the two tools to automatically keep this in order. For this we need to be able to store the config files somewhere available for everybody and for any project.

In my research, I did not find the possibility to give an Absolute Path to the config files of the tools.

This is why I added the feature myself and recompiled the tools. Could some body help me with the integration of the feature in the community?


Best regards,
Cezar
_______________________________________________
cfe-commits mailing list
cfe-commits at lists.llvm.org<mailto:cfe-commits at lists.llvm.org>
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200910/4cb05cfa/attachment-0001.html>


More information about the cfe-commits mailing list