godotengine / godotengine/godot-visual-script

clang-format, editorconfig, gitignore, gitattributes missing

Open
#35 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
131
Forks
25
PR merge metrics
No merged PRs in 30d

Description

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:

```diff
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
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.