pkgcheck
pkgcheck copied to clipboard
[Bug]: Confusing line numbers in EclassExportFuncsBeforeInherit
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
At b1620a6c399a9950305159728dd9d7fc40e7dfe8 in gentoo.git:
$ pkgcheck scan -k EclassExportFuncsBeforeInherit
eclass
EclassExportFuncsBeforeInherit: guile-single: EXPORT_FUNCTIONS (line 243) called before inherit (line 115)
EclassExportFuncsBeforeInherit: xdg: EXPORT_FUNCTIONS (line 48) called before inherit (line 28)
But, for example, in guile-single.eclass, we have:
case "${EAPI}" in
8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac
if [[ ! "${_GUILE_SINGLE_ECLASS}" ]]; then
_GUILE_SINGLE_ECLASS=1
inherit guile-utils
[...]
EXPORT_FUNCTIONS pkg_setup src_prepare src_install
fi # _GUILE_SINGLE_ECLASS
Saying a line was called before another is confusing, especially if an inherit guard is active. I can maybe see it if one isn't...
Expected Behavior
Clearer error if it's even a true-positive. (Unclear what's happening but the "... called before ..." line being later than the "inherit" line is weird.)
pkgcheck version
0.10.31
pkgcore version
0.12.28