Skip to content

Commit

Permalink
Check 'maintainers' key contain sensible values
Browse files Browse the repository at this point in the history
  • Loading branch information
alexAubin committed Apr 22, 2024
1 parent 8a22ded commit 428f125
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions package_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1790,6 +1790,15 @@ def mandatory_fields(self):
if "license" not in self.manifest.get("upstream"):
yield Error("The license key in the upstream section is missing")

@test()
def maintainer_sensible_values(self):
if "maintainers" in self.manifest.keys():
for value in self.manifest["maintainers"]:
if not value.strip():
yield Warning("Please don't put empty string as a maintainer x_x")
elif "," in value:
yield Warning("Please don't use comma in maintainers value, this is supposed to be a list such as ['foo', bar'], not ['foo, bar'] x_x")

@test()
def upstream_fields(self):
if "upstream" not in self.manifest.keys():
Expand Down

0 comments on commit 428f125

Please sign in to comment.