@@ -126,6 +126,21 @@ def desc(self):
126126 return f"{ self .path !r} : unknown value{ s } for { self .group !r} : { values } "
127127
128128
129+ class ProfileMissingImplicitExpandValues (results .ProfilesResult , results .Warning ):
130+ """Profile is missing USE_EXPAND_VALUES for implicit USE_EXPAND group."""
131+
132+ def __init__ (self , path : str , groups : Iterable [str ]):
133+ super ().__init__ ()
134+ self .path = path
135+ self .groups = tuple (groups )
136+
137+ @property
138+ def desc (self ):
139+ s = pluralism (self .groups )
140+ groups = ", " .join (self .groups )
141+ return f"{ self .path !r} : missing USE_EXPAND_VALUES for USE_EXPAND group{ s } : { groups } "
142+
143+
129144class UnknownProfileArch (results .ProfilesResult , results .Warning ):
130145 """Profile includes unknown ARCH."""
131146
@@ -185,6 +200,7 @@ class ProfilesCheck(Check):
185200 UnknownProfilePackageKeywords ,
186201 UnknownProfileUseExpand ,
187202 UnknownProfileUseExpandValue ,
203+ ProfileMissingImplicitExpandValues ,
188204 UnknownProfileArch ,
189205 ProfileWarning ,
190206 ProfileError ,
@@ -345,6 +361,14 @@ def _make_defaults(self, filename: str, node: sources.ProfileNode, vals: dict[st
345361 for key in vals .keys () & self .use_expand_groups .keys ():
346362 if unknown := set (vals .get (key , "" ).split ()) - self .use_expand_groups [key ]:
347363 yield UnknownProfileUseExpandValue (pjoin (node .name , filename ), key , sorted (unknown ))
364+ if missing_values := {
365+ use_group
366+ for use_group in implicit_use_expands
367+ if f"USE_EXPAND_VALUES_{ use_group } " not in vals
368+ }:
369+ yield ProfileMissingImplicitExpandValues (
370+ pjoin (node .name , filename ), sorted (missing_values )
371+ )
348372 if arch := vals .get ("ARCH" , None ):
349373 if arch not in self .keywords .arches :
350374 yield UnknownProfileArch (pjoin (node .name , filename ), arch )
0 commit comments