mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 13:39:02 +00:00
lint: multiple unary operator
This commit is contained in:
parent
4e505efc50
commit
de87419df9
1 changed files with 3 additions and 2 deletions
|
@ -908,7 +908,7 @@ static int builtin_generic(parser_t &parser, io_streams_t &streams, wchar_t **ar
|
|||
|
||||
/// Return a definition of the specified function. Used by the functions builtin.
|
||||
static wcstring functions_def(const wcstring &name) {
|
||||
CHECK(!name.empty(), L"");
|
||||
CHECK(!name.empty(), L""); //!OCLINT(multiple unary operator)
|
||||
wcstring out;
|
||||
wcstring desc, def;
|
||||
function_get_desc(name, &desc);
|
||||
|
@ -1090,7 +1090,8 @@ static int builtin_functions(parser_t &parser, io_streams_t &streams, wchar_t **
|
|||
}
|
||||
|
||||
// Erase, desc, query, copy and list are mutually exclusive.
|
||||
if ((erase + (!!desc) + list + query + copy) > 1) {
|
||||
int describe = desc ? 1 : 0;
|
||||
if (erase + describe + list + query + copy > 1) {
|
||||
streams.err.append_format(_(L"%ls: Invalid combination of options\n"), argv[0]);
|
||||
|
||||
builtin_print_help(parser, streams, argv[0], streams.err);
|
||||
|
|
Loading…
Reference in a new issue