Skip to content

Commit 013b8d6

Browse files
committed
MissingInherits: add some specials to exclude list
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent ca188bb commit 013b8d6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/pkgcheck/checks/codingstyle.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,14 +825,15 @@ def __init__(self, *args, eclass_addon):
825825
self.exported.setdefault(name, set()).add(eclass)
826826

827827
# collect all @USER_VARIABLEs, which are excluded from MissingInherits
828-
self.user_variables = frozenset(
828+
user_variables = frozenset(
829829
{
830830
x.name
831831
for eclass_obj in self.eclass_cache.values()
832832
for x in eclass_obj.variables
833833
if x.user_variable
834834
}
835835
)
836+
self.exclude_missing_inherit = user_variables | {"CTARGET", "BUILD_DIR"}
836837

837838
# register EAPI-related funcs/cmds to ignore
838839
self.eapi_funcs = {}
@@ -911,7 +912,7 @@ def feed(self, pkg):
911912
if node.parent.type == "unset_command":
912913
continue
913914
if name not in self.eapi_vars[pkg.eapi] | assigned_vars.keys():
914-
if name in self.user_variables:
915+
if name in self.exclude_missing_inherit:
915916
continue
916917
lineno, _colno = node.start_point
917918
if eclass := self.get_eclass(name, pkg):

0 commit comments

Comments
 (0)