check-capitalization: Exclude certain uses of the word "realm".

Uses that are actually a variable name don't make sense to exclude.
This commit is contained in:
Tim Abbott 2018-03-16 16:41:21 -07:00
parent c147d2e140
commit 8e334b0f64
1 changed files with 4 additions and 0 deletions

View File

@ -205,6 +205,10 @@ def check_banned_words(text: str) -> List[str]:
errors = []
for word, reason in BANNED_WORDS.items():
if word in lower_cased_text:
# Hack: Should move this into BANNED_WORDS framework; for
# now, just hand-code the skips:
if 'realm_name' in lower_cased_text:
continue
kwargs = dict(word=word, text=text, reason=reason)
msg = "{word} found in '{text}'. {reason}".format(**kwargs)
errors.append(msg)