mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 10:26:28 +00:00
custom_check: Improve check for exit(...) call in management commands.
It's better for this to catch all exit(...) calls with non-zero exit code, given the purpose is to catch all exits with failure, as opposed to only exit(1).
This commit is contained in:
committed by
Alex Vandiver
parent
7cc345d7b1
commit
3688ff38bd
@@ -456,7 +456,7 @@ python_rules = RuleList(
|
||||
],
|
||||
},
|
||||
{
|
||||
"pattern": "exit[(]1[)]",
|
||||
"pattern": r"exit[(][1-9]\d*[)]",
|
||||
"include_only": {"/management/commands/"},
|
||||
"description": "Raise CommandError to exit with failure in management commands",
|
||||
"exclude": {"zerver/management/commands/process_queue.py"},
|
||||
|
||||
Reference in New Issue
Block a user