1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-01 16:38:31 +00:00
Commit Graph

537 Commits

Author SHA1 Message Date
George Marques
501c5b0900 GDScript: Make check for exposed classes more consistent
Some places were already checking if classes from ClassDB were exposed,
while others didn't. This makes the check more consistent to avoid
disparities which can lead to crashes.
2025-11-25 12:24:18 -03:00
Thaddeus Crews
ae9732139a Merge pull request #109433 from KoBeWi/hastension
Add `has_extension()` method to String
2025-10-31 09:23:30 -05:00
Lukas Tenbrink
d2ee378d1c Remove VariantHasher and VariantComparator in favour of specializing HashMapHasherDefault and HashMapComparatorDefault. 2025-10-07 13:47:39 +02:00
Thaddeus Crews
b9730c0b2e Merge pull request #110240 from westenral/add_int_division_warnings
Add checks for integer vectors for integer division warning
2025-09-30 20:10:33 -05:00
Thaddeus Crews
8bc1dd63f4 Merge pull request #107936 from mihe/missing-await-warning
Add opt-in GDScript warning for when calling coroutine without `await`
2025-09-30 18:35:05 -05:00
westenral
565e1aaeb9 Add checks for integer vectors for integer division warning
Remove warnings for invalid Vectori combinations

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2025-09-04 10:13:05 -04:00
Aaron Franke
b73597292b Improve error messages for lambda functions without a body 2025-08-18 06:29:20 -07:00
kobewi
a33ae0be0e Add has_extension() method to String 2025-08-12 13:15:16 +02:00
George Marques
38f8643b00 GDScript: Properly detect native class on static call optimization 2025-07-25 09:17:39 -03:00
A Thousand Ships
f11aff3841 Editor: Restructure editor code
Moving various editor files into sub folders to reduce clutter
2025-07-04 18:18:22 +02:00
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