mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
lint: too few branches in switch statement
This commit is contained in:
parent
de87419df9
commit
003ea83410
1 changed files with 4 additions and 9 deletions
|
@ -1171,21 +1171,16 @@ parser_test_error_bits_t parse_util_detect_errors(const wcstring &buff_src,
|
|||
break;
|
||||
}
|
||||
|
||||
switch (parse_node_tree_t::statement_boolean_type(*spec_statement)) {
|
||||
case parse_bool_and: { // this is not allowed
|
||||
parse_bool_statement_type_t bool_type =
|
||||
parse_node_tree_t::statement_boolean_type(*spec_statement);
|
||||
if (bool_type == parse_bool_and) { // this is not allowed
|
||||
errored = append_syntax_error(
|
||||
&parse_errors, spec_statement->source_start,
|
||||
BOOL_AFTER_BACKGROUND_ERROR_MSG, L"and");
|
||||
break;
|
||||
}
|
||||
case parse_bool_or: { // this is not allowed
|
||||
} else if (bool_type == parse_bool_or) { // this is not allowed
|
||||
errored = append_syntax_error(
|
||||
&parse_errors, spec_statement->source_start,
|
||||
BOOL_AFTER_BACKGROUND_ERROR_MSG, L"or");
|
||||
break;
|
||||
}
|
||||
// All others are OK.
|
||||
default: { break; }
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue