lint: Prevent "userid" in code.

We should always use user_id for consistency sake.
This commit is contained in:
Steve Howell
2017-10-07 08:55:36 -07:00
committed by showell
parent 10a30bece1
commit 86d372f9ce

View File

@@ -279,6 +279,8 @@ def build_custom_checkers(by_lang):
{'pattern': 'django.utils.translation', {'pattern': 'django.utils.translation',
'include_only': set(['test/']), 'include_only': set(['test/']),
'description': 'Test strings should not be tagged for translationx'}, 'description': 'Test strings should not be tagged for translationx'},
{'pattern': 'userid',
'description': 'We prefer user_id over userid.'},
{'pattern': 'json_success\({}\)', {'pattern': 'json_success\({}\)',
'description': 'Use json_success() to return nothing'}, 'description': 'Use json_success() to return nothing'},
# To avoid json_error(_variable) and json_error(_(variable)) # To avoid json_error(_variable) and json_error(_(variable))