refactor: enable formatting for ternaries

This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
This commit is contained in:
dundargoc
2023-11-16 10:59:11 +01:00
committed by dundargoc
parent ec79ff893d
commit a6e3d93421
59 changed files with 318 additions and 377 deletions

View File

@@ -192,11 +192,11 @@ static bool check_xdiff_opt(ObjectType actType, ObjectType expType, const char *
{
if (actType != expType) {
const char *type_str =
expType == kObjectTypeString ? "string" :
expType == kObjectTypeInteger ? "integer" :
expType == kObjectTypeBoolean ? "boolean" :
expType == kObjectTypeLuaRef ? "function" :
"NA";
expType == kObjectTypeString
? "string" : (expType == kObjectTypeInteger
? "integer" : (expType == kObjectTypeBoolean
? "boolean" : (expType == kObjectTypeLuaRef
? "function" : "NA")));
api_set_error(err, kErrorTypeValidation, "%s is not a %s", name,
type_str);