commit: 013b8d678895caf3f66173f6dfd2379c5219d576
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 1 19:19:43 2023 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 1 19:19:43 2023 +0000
URL:
https://gitweb.gentoo.org/proj/pkgcore/pkgcheck.git/commit/?id=013b8d67
MissingInherits: add some specials to exclude list
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
src/pkgcheck/checks/codingstyle.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/pkgcheck/checks/codingstyle.py
b/src/pkgcheck/checks/codingstyle.py
index 0c33c650..60f1ce98 100644
--- a/src/pkgcheck/checks/codingstyle.py
+++ b/src/pkgcheck/checks/codingstyle.py
@@ -825,7 +825,7 @@ class InheritsCheck(Check):
self.exported.setdefault(name, set()).add(eclass)
# collect all @USER_VARIABLEs, which are excluded from MissingInherits
- self.user_variables = frozenset(
+ user_variables = frozenset(
{
x.name
for eclass_obj in self.eclass_cache.values()
@@ -833,6 +833,7 @@ class InheritsCheck(Check):
if x.user_variable
}
)
+ self.exclude_missing_inherit = user_variables | {"CTARGET",
"BUILD_DIR"}
# register EAPI-related funcs/cmds to ignore
self.eapi_funcs = {}
@@ -911,7 +912,7 @@ class InheritsCheck(Check):
if node.parent.type == "unset_command":
continue
if name not in self.eapi_vars[pkg.eapi] | assigned_vars.keys():
- if name in self.user_variables:
+ if name in self.exclude_missing_inherit:
continue
lineno, _colno = node.start_point
if eclass := self.get_eclass(name, pkg):