summaryrefslogtreecommitdiff
path: root/modules/gdscript
AgeCommit message (Collapse)Author
2020-06-17Merge pull request #38067 from ThakeeNathees/elif-error-line-fixedRémi Verschelde
GDScript debugger incorrect error line fixed
2020-06-17GDScript debugger incorrect error line fixedThakee Nathees
if the first line of an else or an elif throws a runtime error the debugger shows incorrect line number.
2020-06-16Merge pull request #39275 from ThakeeNathees/shadowed-warning-for-loop-counterRémi Verschelde
Added shadowed var warning for `for` loop counter
2020-06-16Merge pull request #39314 from ThakeeNathees/debugger-incorrect-line-fixRémi Verschelde
GDScript debugger stepping to incorrect line fix
2020-06-16Merge pull request #39315 from ThakeeNathees/ctrl-click-fix-for-subclassesRémi Verschelde
Fix: Ctrl + Click not working for subclasses
2020-06-15GDScript LSP: Fix wrong error checks added in #39385Rémi Verschelde
Reverts `latest_client_id` back to 0, as I misunderstood how the client IDs are assigned and, without further testing and debugging, I can't say if this was a bug or a valid default value. Similarly, a `latest_client_id` of -1 is no longer raising an error. Fixes #39548.
2020-06-08GDScript LSP: Fix crash in notify_clientRémi Verschelde
`latest_client_id` now defaults to `-1` (invalid ID) instead of `0`. Also fix typo in notification `gdscrip_client/changeWorkspace`, and fix argument names in method binds. Fixes #39375.
2020-06-05Merge pull request #39301 from Calinou/fix-argument-parameter-confusionRémi Verschelde
Tweak the GDScript error message about passed argument type mismatch
2020-06-05Merge pull request #39276 from ThakeeNathees/predefined-check-for-loop-counterRémi Verschelde
Added predefined var check for `for` loop counter
2020-06-05Fix: Ctrl + Click not working for subclassesThakee Nathees
2020-06-05Debugger stepping to incorrect line fixThakee Nathees
Fix: #39296
2020-06-04Tweak the GDScript error message about passed argument type mismatchHugo Locurcio
This makes it less confusing. This closes https://github.com/godotengine/godot-proposals/issues/670.
2020-06-04predefined var check for `for` loop counterThakee Nathees
2020-06-04shodowed var warning for `for` loop counterThakee Nathees
Fix: #39268
2020-05-29Actually set GDScript static referenceGeorge Marques
2020-05-27Merge pull request #39074 from vnen/gdscript-assert-messageRémi Verschelde
Fix assert message when no custom message is set
2020-05-26GDScript: Fix assert message when no custom message is setGeorge Marques
2020-05-25Merge pull request #39015 from ↵Rémi Verschelde
ThakeeNathees/dict-key-autocomplete-regression-fix regression: dictionary key no autocomplete fix
2020-05-24regression: dictionary key no autocomplete fixThakee Nathees
Fix: #38998
2020-05-21Merge pull request #33689 from jbuck3/signal-errorRémi Verschelde
Trigger an error when trying to define a preexisting signal in GDScript
2020-05-21Merge pull request #35900 from yamgent/unreachableRémi Verschelde
Fix false positive "Unreachable code" warning for loops
2020-05-19Fix too eager GDScriptFunctionState stack cleanupPedro J. Estébanez
2020-05-16gdscript_parser: Fix "unreachable code" false positive for loopsTan Wang Leng
Depending on the conditional statements of the 'for' and 'while' loops, their body may not even execute once. For example: func a(): var arr = [] for i in arr: return i # can be reached, but analysis says cannot return -1 func b(): var should_loop = false while should_loop: return 1 # can be reached, but analysis says cannot return 0 The parser will complain that the statements after the comment cannot be reached, but it is clearly possible for our scenario. This is because the parser falsely assumes that the loop body will always execute at least once. Fix the code to remove this assumption for both of those loops.
2020-05-15Fix incorrect capabilities notification in LSPOliver Frank
(cherry picked from commit 2173d041af711c111d60d1fc1f45f96f4f8c7271)
2020-05-15break, continue outside of a loop, match statement handledThakee Nathees
2020-05-14Merge pull request #38738 from akien-mga/cause-we-never-go-out-of-styleRémi Verschelde
Style: Remove new line at block start, enforce line between functions, enforce braces in if and loop blocks
2020-05-14Style: Enforce braces around if blocks and loopsRémi Verschelde
Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2020-05-14Merge pull request #38610 from ThakeeNathees/infer-type-null-errorRémi Verschelde
set parser error when infer type is null
2020-05-14Style: Enforce separation line between function definitionsRémi Verschelde
I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-05-14Merge pull request #38611 from ThakeeNathees/shadow-var-warning-bug-fixRémi Verschelde
shadowed var warning in nested block bug fix
2020-05-14Modernize remaining uses of 0/NULL instead of nullptr (C++11)Rémi Verschelde
Using clang-tidy's `modernize-use-nullptr`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2020-05-14Port member initialization from constructor to declaration (C++11)Rémi Verschelde
Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
2020-05-13set parser error when infer type is nullThakee Nathees
2020-05-13Merge pull request #38609 from ↵Rémi Verschelde
ThakeeNathees/range-crash-with-non-numeric-const-fix range() with non-numeric const argument crash fix
2020-05-13Merge pull request #38708 from ThakeeNathees/init-assign-type-parser-bug-fixRémi Verschelde
regression: var declaration type info parser bug fix
2020-05-13regression: static func can't access const fixThakee Nathees
2020-05-13regression: var declaration type info parser bug fixThakee Nathees
2020-05-10Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde
Part of #33027.
2020-05-10Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde
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.
2020-05-10Merge pull request #37160 from ↵Rémi Verschelde
ThakeeNathees/saveing-cyclic-inheritance-crash-fix Fix: saving gdscript with cyclic inheritance crash the editor
2020-05-10Merge pull request #37020 from aaronfranke/rangeRémi Verschelde
Allow using integer vectors for iteration and make range() use them
2020-05-10shadowed var warning in nested block bug fixThakee Nathees
Fix: #38552
2020-05-10range() with non-numeric const argument crash fixThakee Nathees
2020-05-10fixed: saving gdscript with cyclic inheritance crash the editorThakee Nathees
Fix: #9609
2020-05-10more clearer unexpected statement end error messagesThakee Nathees
2020-05-09Merge pull request #38481 from RandomShaper/improve_yieldRémi Verschelde
Fix object leaks caused by unfulfilled yields
2020-05-09Merge pull request #38357 from ThakeeNathees/dict2inst-crash-fixRémi Verschelde
fix: dict2inst crash when constructor has arguments
2020-05-09Merge pull request #37598 from ThakeeNathees/GDScript-type-resolve-bug-fixRémi Verschelde
GDScript class var type resolve bug fixed
2020-05-09Merge pull request #37033 from ThakeeNathees/python-like-str-escapeRémi Verschelde
python like string escape implemented