Mikael Hermansson
a3e58a385f
Add opt-in GDScript warning for when calling coroutine without await
2025-06-27 20:24:41 +02:00
Aaron Franke
1085200f51
GDScript: Replace abstract
keyword with @abstract
annotation
...
Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
2025-06-23 12:24:45 -07:00
Thaddeus Crews
0f05e91889
Merge pull request #82808 from dalexeev/gds-vararg
...
GDScript: Add support for variadic functions
2025-06-09 17:08:48 -05:00
Danil Alexeev
a13fbc6e3e
GDScript: Optimize non-constant for
-range
2025-06-09 22:04:39 +03:00
Danil Alexeev
ee121ef80e
GDScript: Add support for variadic functions
2025-06-09 21:53:05 +03:00
Danil Alexeev
a7cf2069d5
GDScript: Add abstract methods
...
Co-authored-by: ryanabx <ryanbrue@hotmail.com>
2025-06-09 20:11:58 +03:00
Thaddeus Crews
d237e31a89
Style: Remove redundant DEBUG_METHODS_ENABLED
...
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Thaddeus Crews
b59d6bea4f
Merge pull request #67777 from aaronfranke/virtually-annotated
...
Add a keyword for abstract classes in GDScript
2025-05-13 16:22:16 -05:00
Malcolm Anderson
d8db03e31a
Fix a few GDScript warning messages for grammar and consistency
...
Regenerate test results
Improve warning message for `INT_AS_ENUM_WITHOUT_CAST`
Improve `REDUNDANT_AWAIT` message and regenerate tests
Allow warning message for UNASSIGNED_VARIABLE_OP_ASSIGN to display specific operator
Remove "being" from some messages to make them consistent and clearer
Update expected test results
Use Variant::get_operator_name for determining string representation of operator instead of big switch-case
Update tests
Update modules/gdscript/gdscript_warning.cpp
Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
Update tests... again
2025-05-06 20:28:01 -07:00
Aaron Franke
067704f1cd
Add a keyword for abstract classes in GDScript
...
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
2025-05-02 00:03:04 -07:00
lawnjelly
f8f350a32a
Add GLOBAL_GET
cached macros.
...
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
Lukas Tenbrink
bfdb0f0ecf
Fix various sanitizer issues.
2025-04-28 15:23:35 +02:00
Thaddeus Crews
5d697c31c1
Merge pull request #78837 from dalexeev/gds-const-array-and-dict-constructors
...
GDScript: Add constant `Array` and `Dictionary` constructors
2025-04-24 09:09:29 -05:00
Thaddeus Crews
0d267e7b1e
Core: Add dedicated BitField
template
2025-04-11 11:53:26 -05:00
HolonProduction
e7487263ad
Autocompletion: Don't add parenthesis if Callable
is expected
2025-04-10 18:40:32 +02:00
Yufeng Ying
7a1a970c25
size() <= 0 and size() < 1.
2025-04-02 19:18:44 +08:00
Danil Alexeev
7721e13a92
GDScript: Add constant Array
and Dictionary
constructors
2025-03-31 21:31:34 +03:00
A Thousand Ships
d9721954e6
[Core] Use Vector
for MethodInfo::arguments
2025-03-10 13:57:53 +01:00
A Thousand Ships
466590d0ec
Use get_slicec
instead of get_slice
for single character splitters
2025-03-08 20:36:37 +01:00
Malcolm Anderson
8e8f93cf0c
Display correct symbol in warning when unique name is used without @onready annotation
...
Add tests for `GET_NODE_DEFAULT_WITHOUT_ONREADY` warning with unique nodes
Small modifications to tests
2025-02-06 10:49:08 -08:00
kobewi
c29e9e9b29
Ensure path for shallow scripts
2025-01-11 21:20:31 +01:00
Danil Alexeev
cd918ff470
GDScript: Remove RENAMED_IN_GODOT_4_HINT
from GDScriptWarning::Code
enum
2025-01-09 21:07:41 +03:00
Aarni Koskela
f134769506
Fix various typos
...
* Add TODO notes for typos that should be fixed for 5.0
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
A Thousand Ships
a1846b27ea
Improve use of Ref.is_null/valid
...
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
Yufeng Ying
33817b186f
Remove unused header in drivers and modules.
...
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2024-12-24 00:40:47 +08:00
Danil Alexeev
03b05cf9ac
Core: Fix built-in enum constant bindings
2024-11-22 14:03:21 +03:00
girdenis-p
413490c270
Fix analyzer pushing SHADOWED_VARIABLE warning for members shadowed in subclasses
...
This fixes a bug in the analyzer where it did not push the SHADOWED_VARIABLE_BASE_CLASS
warning for members shadowed by variable in subclass. It does this by comparing the class
which contains the shadowed member with the class containing the variable, and pushing
SHADOWED_VARIABLE only if the classes are the same. Additionally, SHADOWED_VARIABLE_BASE_CLASS
can take an extra symbol which helps to specify the line for non native base class.
2024-11-06 15:04:14 +00:00
Clay John
b5368d5e40
Merge pull request #98356 from dustdfg/gdscript_endif_readability_comments
...
Add some comments to `#endif's` where it helps readability
2024-10-24 19:11:42 -07:00
rune-scape
eb8b9898c9
GDScript: Fix cached parser error when using typed Dictionaries
2024-10-22 02:13:16 -07:00
Yevhen Babiichuk (DustDFG)
8c29ef38fc
Add some comments to #endif's where it will easier life
...
Also added some new line to improve readability
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
2024-10-21 14:31:45 +03:00
Chaosus
54f6a1bf64
Fix lookup symbol for enum members to search a correct code definition
2024-10-08 22:46:44 +03:00
Rémi Verschelde
0b4ae20156
Merge pull request #78656 from Repiteo/typed-dictionary
...
Implement typed dictionaries
2024-09-06 22:38:13 +02:00
Rémi Verschelde
d3be91e6ab
Merge pull request #89675 from dalexeev/gds-correct-unused-signal-warning
...
GDScript: Do not produce `UNUSED_SIGNAL` warning for common implicit uses
2024-09-05 18:34:45 +02:00
Thaddeus Crews
9853a69144
Implement typed dictionaries
2024-09-04 10:27:26 -05:00
Rémi Verschelde
4e051ff6f7
Merge pull request #78178 from dalexeev/gds-add-non-tool-extends-tool-error
...
GDScript: Add warning if non-`@tool` class extends `@tool` class
2024-08-28 13:14:13 +02:00
rune-scape
e680369d5b
GDScript: Fix too many calls to 'remove_parser'
...
+fix excessive memory allocations when 'load'ing many dependant scripts
+fix excessive calls to vformat
2024-08-03 20:52:44 -07:00
rune-scape
6e8fa6dd50
GDScript: Fix common mismatched external parser errors
2024-07-31 12:54:16 -07:00
Rémi Verschelde
f2918c73cf
Revert "GDScript: Fix common mismatched external parser errors"
...
This reverts commit c75225ffb2
.
This caused a crashing regression for multiple users:
https://github.com/godotengine/godot/pull/94617#issuecomment-2247868580
2024-07-25 09:20:23 +02:00
Rémi Verschelde
e91725f490
Merge pull request #94617 from rune-scape/fix-mismatched-parsers
...
GDScript: Fix common mismatched external parser errors
2024-07-24 09:59:19 +02:00
rune-scape
c75225ffb2
GDScript: Fix common mismatched external parser errors
2024-07-23 12:25:23 -07:00
Danil Alexeev
638148a184
GDScript: Fix false positive cases of ENUM_VARIABLE_WITHOUT_DEFAULT
2024-07-22 21:45:01 +03:00
baptr
810fcc7431
Fix gdscript analyzer error when instantiating EditorPlugins.
...
Editor code is not instantiable outside of the editor
(1d14c054a1/core/object/class_db.cpp (L369)
).
This is fine for editor plugins and the like, but the GDScript analyzer
balks at it, causing F5 runs to fail: #73525 .
Instead, we really just want to know if the type is abstract - so add
a new ClassDB method to check that and nothing else.
Update core/object/class_db.cpp
Apply code review comments
Co-Authored-By: Bryce <1522777+baptr@users.noreply.github.com>
2024-07-10 10:24:57 +02:00
Danil Alexeev
3f52871f70
GDScript: Add warning if non-@tool
class extends @tool
class
2024-07-04 10:31:01 +03:00
Danil Alexeev
d15ed0bcbb
GDScript: Fix false positive CONFUSABLE_CAPTURE_REASSIGNMENT
warnings
2024-06-28 16:41:32 +03:00
Danil Alexeev
68898dbcc9
GDScript: Add CONFUSABLE_CAPTURE_REASSIGNMENT
warning
2024-06-28 11:12:01 +03:00
Rémi Verschelde
0364443d12
Merge pull request #93346 from RandomShaper/gds_cyc_alt
...
GDScript: Enhance handling of cyclic dependencies
2024-06-26 18:15:16 +02:00
Pedro J. Estébanez
c1391489e3
GDScript: Enhance handling of cyclic dependencies
2024-06-26 17:44:32 +02:00
Hilderin
e18db6fe60
Fix editor crash when invalid global class script path
2024-06-25 08:13:04 -04:00
Rémi Verschelde
ce82984b5c
Merge pull request #92544 from dalexeev/gds-fix-const-non-metatype-subscript
...
GDScript: Fix subscript resolution on constant non-metatype GDScript base
2024-05-30 22:38:36 +02:00
Danil Alexeev
3fd30ed4ff
GDScript: Do not produce INFERRED_DECLARATION
on type import
2024-05-30 19:30:07 +03:00