<div dir="ltr">> Making it easier<br>for users to enable all of the checks at once requires check authors<br>to consider *all* interactions between modules, and to date that isn't<br>a price we've been willing to make check authors pay. Instead, we<br>typically view modules as being orthogonal sets of functionality that<br>may or may not play well together.<div><br></div><div>Fully agree to that, checks should absolutely be independent, granular and focused on doing one single thing without depending on one another. And they may conflict with each other. My point is that it should be <b>the user</b> making the decision as to how to handle conflicts, enabling and disabling whichever checks they want. Why is that a problem? We are not requiring extra work on LLVM developers. Why should they have a say on how the user configures the tool? If developers have exposed this public CLI/config interface, users are free to use it as they see fit (and pay the price of their choices, of course). </div><div><br></div><div>> You're proposing to make aliases be sort of second-class checks<br></div><div><br></div><div>Hmm, not exactly, I agree with you that all publicly documented checks should be regarded as "first-class" checks. What I'm proposing here could be considered more as an "optimization" - don't run the same check twice, just re-use previous results. If you know that you are going to run 2 checks that are identical, just run one of them. </div><div><br></div><div>> we've never really cared which module has the primary check and which one has the alias check</div><div>I actually think this is one of the problems that you were concerned about above. Today, not all checks are first-class. There are "primary" checks and "alias" checks, and a decision has to be made as to where to put which, which causes the very issues you are describing. Not all checks from cppcoreguidelines are "primary", some come from "misc", so what? They aren't any less valuable.</div><div><br></div><div>I refer to my question above - why do we even need this distinction between "primary" and "alias", i.e. what problem is this solving? There's 3 checks checking for C style arrays? That's great, why not just link them to the same documentation, and internally (not leaked to the user) use the same implementation?<br></div><div><br></div><div>The only use case I can think of to publicly document that there are "alias" checks is to let the user know that they can "skip redundant checks" by manually disabling them. If there's any other use case I'd be very happy to know!</div><div><br></div><div>/Carlos</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 3, 2021 at 6:19 PM Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.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">On Sun, Oct 3, 2021 at 11:24 AM Aaron Ballman <<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>> wrote:<br>
> To date, aliases have been surfaced to the user as a first-class check<br>
> (while the documentation typically redirects to the primary check for<br>
> simplicity of writing check aliases, there's no requirement that they<br>
> do so; other than that, aliases should behave the same as any other<br>
> check as far as the user is concerned.) You're proposing to make<br>
> aliases be sort of second-class checks that are more closely tied to<br>
> the primary check by providing an option that says aliases are<br>
> disabled as a blanket operation rather than a case-by-case basis. I am<br>
> not convinced this is a good approach. We may already have checks for<br>
> which this is a problem (where the aliased check and the primary check<br>
> are checking different things), and this closes off the design space<br>
> for such checks in the future (and possibly encourages less code reuse<br>
> in the process).<br>
><br>
> Btw, I'm not saying "no way", I'm saying "let's make sure we're not<br>
> regressing functionality or painting ourselves into a corner."<br>
<br>
Also, to date I believe we've never really cared which module has the<br>
primary check and which one has the alias check (it's fine for the<br>
primary to be in cert- and the alias to be in bugprone- or vice<br>
versa), but with this sort of an option, that implementation detail is<br>
leaked out to the user in a more obvious way. If we go this route, we<br>
might have to move some checks around so there's some consistent rule<br>
to aid users (like, the general-purpose module holds the primary and<br>
the coding style guidelines get the alias), but it may not work in<br>
every situation (I can imagine a check living in two style guides but<br>
not a general purpose module, or two general purpose modules but not a<br>
style guide).<br>
<br>
~Aaron<br>
</blockquote></div>