Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Büchse <[email protected]>
  • Loading branch information
mbuechse committed Dec 21, 2023
1 parent 08b8027 commit a1fd820
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/chk_adrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def check_front_matter(self, fn, front):
]
if errors:
self.emit(f"in {fn}: syntax errors with key(s) {', '.join(errors)}")
replaced_by = front.get("replaced_by")
# now do cross-field checks
status = front.get("status")
if replaced_by and status not in ("Deprecated", "Rejected"):
if "replaced_by" in front and status not in ("Deprecated", "Rejected"):
self.emit(f"in {fn}: replaced_by is set, but status does not match")
if status == "Deprecated" and "obsoleted_at" not in front:
self.emit(f"in {fn}: status is Deprecated, but deprecated_at date is missing")
Expand Down

0 comments on commit a1fd820

Please sign in to comment.