Some libraries use **.internal.** packages to share APIs across artifacts. Let's expand either the denylisted API checker or the restrictcallsto checker to do this check, or possibly make a new one if needed.
Checking this would be easy - it would be an API in a package that contains .internal. and is a PsiCompiledElement (which would indicate that the element is from an external library). Note this wouldn't work for checkDependencies=true though, so something else would need to be in place for that. Maybe if the package doesn't share a common prefix (i.e. com.library.) with the calling package?
Some libraries use
**.internal.**packages to share APIs across artifacts. Let's expand either the denylisted API checker or the restrictcallsto checker to do this check, or possibly make a new one if needed.Checking this would be easy - it would be an API in a package that contains
.internal.and is aPsiCompiledElement(which would indicate that the element is from an external library). Note this wouldn't work forcheckDependencies=truethough, so something else would need to be in place for that. Maybe if the package doesn't share a common prefix (i.e.com.library.) with the calling package?