<div dir="ltr">Hi! <div><br></div><div>Are there any opinions on this topic? As said, there has been several commit attempts to fix this, but people thought it would be better to first discuss it here before hacking some code. So that's why I'm bringing this up :) </div><div><br></div><div>Thanks!</div><div>/Carlos</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 27, 2021 at 1:50 PM Carlos Galvez <<a href="mailto:carlosgalvezp@gmail.com">carlosgalvezp@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi!<div><br></div><div>I'm writing to this list as suggested in this bug:</div><div><a href="https://reviews.llvm.org/D72566" target="_blank">https://reviews.llvm.org/D72566</a><br></div><div><br></div><div>Background</div><div>=========</div><div><br></div><div>clang-tidy has implemented a number of checks, some of which are <i>aliases</i> of "real" checks. Currently if a user specifies that they want to run both the "real" and the "alias" check, clang-tidy will run the same check twice. Or N times if there are N aliases.</div><div><br></div><div>When applying clang-tidy to large codebases, this can have a severe impact in runtime in Continuous Integration checks. The only solution so far is to manually disable alias checks, but this generates noise in the config file, and is error-prone and cumbersome to maintain in the future, as one always need to check the LLVM docs to see what is aliasing what. </div><div><br></div><div>I have read in different bugs that one tricky problem with this is that "some alias checks run with different defaults, therefore leading to different results". I would be interested to know which checks are these and where this different default configuration is documented. I would argue that if 2 checks run different things and produce different results, then they are not aliases. They may share the same implementation, but they are not identical (therefore cannot be called "aliases".</div><div><br></div><div>I have also read the argument "people should not enable all checks". I believe that should be up to users to decide. Plus, as we've seen, there are aliases even within the same category, e.g. "cert-*", so the problem still remains.</div><div><br></div><div>Proposal</div><div>=======</div><div><br></div><div>- Find which checks are "fake aliases", if any - share the same implementation but run with different defaults and produce different results. Change these checks to not be considered as "aliases".</div><div><br></div><div>- Add an opt-in feature (command line, config) to enable "the same check should be run only once". Diagnostics should come only from the "main" check (if it's active) or from the "alias" check (if the "main" check is not active).</div><div><br></div><div>Let me know what you think! I'm a total newby to LLVM but I'm happy to contribute in any way I can :) </div><div><br></div><div>Thanks!</div><div>/Carlos</div><div><br></div></div>
</blockquote></div>