The component validation script was using an incorrect property name
'__COMPONENT_TARGETS' when retrieving component targets. This should be
'__BUILD_COMPONENT_TARGETS' to match the actual property name used
throughout the build system.
This fix ensures the component validation can properly access the list
of component targets and perform validation checks correctly.
There are idf.py hints for helping the user to set component
dependencies properly instead of building sources out-of-component or
including headers from outside the component directory. These are
produced with
tools/idf_py_actions/hint_modules/component_requirements.py.
However, idf.py hints are printed only when the build fails. If the user
starts with a buildable solution then the suggestions to add component
dependencies are not printed.
This commit introduces cmake-level warnings for building source files
from outside the component and including header files without setting up
proper component dependencies.