Skip to content

Commit

Permalink
adding documentation changes warning for EOLd distros
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoote committed Oct 28, 2014
1 parent c57e56d commit 7013aeb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_url_validity.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ def detect_post_eol_release(n, repo, lines):
if matching_lines:
errors.append("There is a change to a release section of an EOLed "
"distribution. Lines: %s" % matching_lines)
if 'doc' in repo:
doc_element = repo['doc']
start_line = doc_element['__line__']
end_line = start_line + 3
# There are 3 lines beyond the tags line. The tag contents as well as
# the url and version number
matching_lines = [l for l in lines if l >= start_line and l <= end_line]
if matching_lines:
errors.append("There is a change to a doc section of an EOLed "
"distribution. Lines: %s" % matching_lines)

return errors

Expand Down

0 comments on commit 7013aeb

Please sign in to comment.