mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 06:46:07 +00:00
refactor(api): consistent VALIDATE messages #22262
Problem: Validation messages are not consistently formatted. - Parameter names sometimes are NOT quoted. - Descriptive names (non-parameters) sometimes ARE quoted. Solution: Always quote the `name` value passed to a VALIDATE macro _unless_ the value has whitespace.
This commit is contained in:
@@ -1089,7 +1089,7 @@ int object_to_color(Object val, char *key, bool rgb, Error *err)
|
||||
});
|
||||
return color;
|
||||
} else {
|
||||
VALIDATE(false, "Invalid %s: expected String or Integer", key, {
|
||||
VALIDATE_EXP(false, key, "String or Integer", NULL, {
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user