diff --git a/assets/semgrep_rules/client/brave-missing-break-in-switch.yaml b/assets/semgrep_rules/client/brave-missing-break-in-switch.yaml index f6d773c1..e91b6781 100644 --- a/assets/semgrep_rules/client/brave-missing-break-in-switch.yaml +++ b/assets/semgrep_rules/client/brave-missing-break-in-switch.yaml @@ -48,3 +48,8 @@ rules: switch ($VAR) { case $VAL1: ... ABSL_FALLTHROUGH_INTENDED; case $VAL2: ... } - pattern-not: | switch ($VAR) { case $VAL1: ABSL_FALLTHROUGH_INTENDED; case $VAL2: ... } + # NOTREACHED_NORETURN + - pattern-not: | + switch ($VAR) { case $VAL1: NOTREACHED_NORETURN(); case $VAL2: ... } + - pattern-not: | + switch ($VAR) { case $VAL1: ... NOTREACHED_NORETURN(); case $VAL2: ... }