This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Force dependency checkers to be hidden
ClosedPublic

Authored by Szelethus on Jun 12 2020, 12:51 PM.

Details

Summary

Since strong dependencies aren't user-facing (its hardly ever legal to disable them), lets enforce that they are hidden. Modeling checkers that aren't dependencies are of course not impacted, but there is only so much you can do against developers shooting themselves in the foot :^)

I also made some changes to the test files, reversing the "test" package for, well, testing.

Diff Detail

Event Timeline

Szelethus created this revision.Jun 12 2020, 12:51 PM
Szelethus edited the summary of this revision. (Show Details)Jun 12 2020, 12:53 PM

My observation is, if there is an example checker, it should be really "example" and not "test". (The "custom" is probably good to rename to "test" but not the "example".) (The names of these files look not good too: A CheckerOptionHandling.cpp contains an example checker, should be probably CheckerOptionHandlingExample.cpp).

My observation is, if there is an example checker, it should be really "example" and not "test". (The "custom" is probably good to rename to "test" but not the "example".) (The names of these files look not good too: A CheckerOptionHandling.cpp contains an example checker, should be probably CheckerOptionHandlingExample.cpp).

That is indeed a very fair point. My rationale was that these examples are in fact tested in the lit files, and my intention when writing them was to test checker registration from plugins.

My observation is, if there is an example checker, it should be really "example" and not "test". (The "custom" is probably good to rename to "test" but not the "example".) (The names of these files look not good too: A CheckerOptionHandling.cpp contains an example checker, should be probably CheckerOptionHandlingExample.cpp).

That is indeed a very fair point. My rationale was that these examples are in fact tested in the lit files, and my intention when writing them was to test checker registration from plugins.

+1 "example" should remain "example" or can be changed to "sample", but it is not a "test". Other parts of this patch seem to be OK for me.

Szelethus updated this revision to Diff 274466.Jun 30 2020, 7:18 AM

Revert changes to plugins and to the related tests, allow the example package to bypass the new restriction.

Now it looks good to me.

This revision is now accepted and ready to land.Jun 30 2020, 7:42 AM
This revision was automatically updated to reflect the committed changes.