godot-visual-script icon indicating copy to clipboard operation
godot-visual-script copied to clipboard

clang-format, editorconfig, gitignore, gitattributes missing

Open nathanfranke opened this issue 3 years ago • 1 comments

When I modified editor/visual_script_editor.cpp for my other PR, there were a ton of diffs automatically from VSCode.

To fix this, all these probably need to be done:

  • [x] Add .clang-format
  • [ ] Add .editorconfig
  • [x] Add .gitattributes and .gitignore (not really related, but still important)
  • [ ] Create a formatting script (optional), and run it (needed, see diff below)
  • [ ] Create static checks on github actions

I got this diff from saving in VSCode, with .clang-format copied from the godotengine/godot:

index fec48d1..e15755f 100644
--- a/editor/visual_script_editor.cpp
+++ b/editor/visual_script_editor.cpp
@@ -615,7 +615,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
 
 	updating_graph = true;
 
-	//byebye all nodes
+	// byebye all nodes
 	if (p_only_id >= 0) {
 		if (graph->has_node(itos(p_only_id))) {
 			Node *gid = graph->get_node(itos(p_only_id));
@@ -896,8 +896,8 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
 					Button *button = memnew(Button);
 					Variant value = node->get_default_input_value(i);
 					if (value.get_type() != left_type) {
-						//different type? for now convert
-						//not the same, reconvert
+						// different type? for now convert
+						// not the same, reconvert
 						Callable::CallError ce;
 						const Variant *existingp = &value;
 						Variant::construct(left_type, value, &existingp, 1, ce);
... CONTINUED

nathanfranke avatar Sep 08 '22 05:09 nathanfranke

Many of these are complete, but I think a few are missing.

fire avatar Aug 22 '23 15:08 fire