mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
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:
@@ -205,6 +205,10 @@ def check_banned_words(text: str) -> List[str]:
|
|||||||
errors = []
|
errors = []
|
||||||
for word, reason in BANNED_WORDS.items():
|
for word, reason in BANNED_WORDS.items():
|
||||||
if word in lower_cased_text:
|
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)
|
kwargs = dict(word=word, text=text, reason=reason)
|
||||||
msg = "{word} found in '{text}'. {reason}".format(**kwargs)
|
msg = "{word} found in '{text}'. {reason}".format(**kwargs)
|
||||||
errors.append(msg)
|
errors.append(msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user