Skip to content

Commit

Permalink
Exclude test files and non existent files (#1652)
Browse files Browse the repository at this point in the history
  • Loading branch information
literalEval authored Mar 12, 2023
1 parent d99cf62 commit b7672c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/check_ignore.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ def _check_for_ignore_directive(filePath):
boolean: Whether the file contains ignore directive or not.
"""

# Either it is a test file, or the file does not exist. This can happen when
# `develop` gets ahead of your branch and has some files which you don't have

if (filePath.startswith('test') or not os.path.exists(filePath)):
return False

with open(filePath, "r") as file:
lines = file.readlines()

Expand Down

0 comments on commit b7672c8

Please sign in to comment.