mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-08-11 08:55:00 +00:00
(#14911) yamllinter: raise if a version has patches but no sources
* yamllinter: raise if a version has patches but no sources * Update conandata_yaml_linter.py * we dont want to make noise se from errors just yet --------- Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
This commit is contained in:
@@ -62,6 +62,14 @@ def main():
|
||||
if "patches" in parsed:
|
||||
for version in parsed["patches"]:
|
||||
patches = parsed["patches"][version]
|
||||
if version not in parsed["sources"]:
|
||||
print(
|
||||
f"::warning file={args.path},line={patches.start_line},endline={patches.end_line},"
|
||||
f"title=conandata.yml inconsistency"
|
||||
f"::Patch(es) are listed for version `{version}`, but there is source for this version."
|
||||
f" You should either remove `{version}` from the `patches` section, or add it to the"
|
||||
f" `sources` section"
|
||||
)
|
||||
for i, patch in enumerate(patches):
|
||||
# Individual report errors for each patch object
|
||||
try:
|
||||
|
Reference in New Issue
Block a user