[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-07-29 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:116-121 + unsigned Priority = 0; for (ClangTidyModuleRegistry::iterator I = ClangTidyModuleRegistry::begin(), E =

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-07-28 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:116-121 + unsigned Priority = 0; for (ClangTidyModuleRegistry::iterator I = ClangTidyModuleRegistry::begin(), E =

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-06-15 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. In D75184#2093089 , @njames93 wrote: > As an afterthought, Would you think it a good idea to extend this logic to > the `ConfigOptionsProvider` That way you can use something along the lines of: > > clang-tidy

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-06-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. As an afterthought, Would you think it a good idea to extend this logic to the `ConfigOptionsProvider` That way you can use something along the lines of: clang-tidy --config='{InheritParentConfig: true, CheckOptions: []}' clang-tidy would then go to read the

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75184#1984565 , @DmitryPolukhin wrote: > I didn't notice the issue because of massive breakage with diff landed just > be bore mine Sorry about that :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-15 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @thakis, I don't see this bot on LLVM http://lab.llvm.org:8011/console Windows bots there still fail due to cmake issues. The issue is very real and thank you for pointing out but how should I find the bot? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-15 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @thakis sorry, I didn't notice the issue because of massive breakage with diff landed just be bore mine and also cmake issues on Windows bots. Thank you for trying to fix it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. i attemtped a fix in 99e4061bd800a525ce1d7e2cbd6672b2fe0ec33d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Breaks Windows due to slashiness in the test: http://45.33.8.238/win/12984/step_8.txt Please take a look, and revert if it takes a while to investigate. (I'd find the diag easier to read without the "the": just "is disabled in") Repository: rG LLVM Github Monorepo

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-15 Thread Dmitry Polukhin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGcb1ee34e9d32: [clang-tidy] Optional inheritance of file configs from parent directories  (authored by DmitryPolukhin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-14 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 257405. DmitryPolukhin added a comment. And one more time :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-14 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 257344. DmitryPolukhin added a comment. One more try to remove useless lint issues Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-14 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 257338. DmitryPolukhin added a comment. Remove clang-format errors in diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-14 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 257336. DmitryPolukhin marked 6 inline comments as done. DmitryPolukhin added a comment. Comments resolved + rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-14 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @alexfh thank you for review! Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.h:101-104 +ClangTidyValue(const char *Value) : Value(Value), Priority(0) {} +ClangTidyValue(const std::string ) : Value(Value), Priority(0) {} +

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-13 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Apologies for the delay! It's sort of a crazy time now =\ The code looks mostly good now modulo a few comments inline. Comment at:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-13 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @alexfh friend ping, please take a look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 ___ cfe-commits mailing list

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-02 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @alexfh friendly ping I implemented solution with priorities to resolve your concerns about `get()` vs `getLocalOrGlobal()` Could you please take another look to this diff? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-01 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 254238. DmitryPolukhin added a comment. Use options priority instead of overriding local options by global Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-20 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. In D75184#1932764 , @alexfh wrote: > There's one more thing to consider: just by looking at the name of a local > option we don't know whether it will be read using `get()` or > `getLocalOrGlobal()`. By removing local

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-20 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75184#1932764 , @alexfh wrote: > There's one more thing to consider: just by looking at the name of a local > option we don't know whether it will be read using `get()` or > `getLocalOrGlobal()`. By removing local options

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D75184#1914788 , @njames93 wrote: > In D75184#1914705 , @DmitryPolukhin > wrote: > > > You are absolutely right about current behaviour. Thank you for catching > > this odd behaviour.

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-16 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @alexfh could you please take another look to the diff? All comments resolved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 249423. DmitryPolukhin added a comment. Applied suggested changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75184#1914705 , @DmitryPolukhin wrote: > You are absolutely right about current behaviour. Thank you for catching this > odd behaviour. I'm not 100% confident what is the right behaviour but my > guess is that overriding

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. In D75184#1912650 , @njames93 wrote: > How are local and global options handled. > From what I can gather it will read the value as `1` as the local option is > checked first no matter which file it was defined in. You

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 249380. DmitryPolukhin added a comment. Handle global options Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-09 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. How are local and global options handled. For example in root .clang-tidy: CheckOptions: - key: some-check.GlobalOption value: '1' and in a subfolder .clang-tidy: CheckOptions: - key: GlobalOption value:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-09 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 249065. DmitryPolukhin marked an inline comment as done. DmitryPolukhin added a comment. Herald added a subscriber: arphaman. Also updated rst file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-09 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @alexfh could you please take another look, I added more tests and updated the doc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-05 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 248457. DmitryPolukhin added a comment. Comments resolved, please take another look. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-04 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. Internally we have something similar, but with unconditional inheritance and a way to include other configs. I was thinking about implementing this in the FileOptionsProvider, but

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-04 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. Friendly ping, please take a look. In large repos there is a significant problem with maintaining .clang-tidy configs in sync without some kind of inheritance with local overrides. If you have thoughts how to make it better, please speak up. Repository: rG

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-02-27 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 246944. DmitryPolukhin added a comment. Fix issue with config inheritance and caching configs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-02-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 246758. DmitryPolukhin added a comment. Rebase on top of master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files:

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-02-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added reviewers: alexfh, gribozavr2. DmitryPolukhin added projects: clang, clang-tools-extra. Herald added subscribers: aheejin, xazax.hun. Without this patch clang-tidy stops finding file configs on the nearest .clang-tidy file. In some cases