mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
parent
03b13e0c69
commit
e956e80c1f
130 changed files with 967 additions and 511 deletions
|
@ -167,11 +167,14 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
|
|||
|
||||
String p = p_path.strip_edges();
|
||||
|
||||
if (p == "") return TTR("Path is empty.");
|
||||
if (p.get_file().get_basename() == "") return TTR("Filename is empty.");
|
||||
if (p == "")
|
||||
return TTR("Path is empty.");
|
||||
if (p.get_file().get_basename() == "")
|
||||
return TTR("Filename is empty.");
|
||||
|
||||
p = ProjectSettings::get_singleton()->localize_path(p);
|
||||
if (!p.begins_with("res://")) return TTR("Path is not local.");
|
||||
if (!p.begins_with("res://"))
|
||||
return TTR("Path is not local.");
|
||||
|
||||
DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
if (d->change_dir(p.get_base_dir()) != OK) {
|
||||
|
@ -216,12 +219,15 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
|
|||
index++;
|
||||
}
|
||||
|
||||
if (!found) return TTR("Invalid extension.");
|
||||
if (!match) return TTR("Wrong extension chosen.");
|
||||
if (!found)
|
||||
return TTR("Invalid extension.");
|
||||
if (!match)
|
||||
return TTR("Wrong extension chosen.");
|
||||
|
||||
/* Let ScriptLanguage do custom validation */
|
||||
String path_error = ScriptServer::get_language(language_menu->get_selected())->validate_path(p);
|
||||
if (path_error != "") return path_error;
|
||||
if (path_error != "")
|
||||
return path_error;
|
||||
|
||||
/* All checks passed */
|
||||
return "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue