Age | Commit message (Collapse) | Author |
|
(cherry picked from commit 07dd627728b71dd3ea30bab9761a847a7e0c911e)
|
|
|
|
|
|
|
|
GDScript: Allow strings as multiline comments
|
|
- Allow identifiers similar to keywords if they are in ASCII range.
- Allow constants to be treated as regular identifiers.
- Allow keywords that can be used as identifiers in expressions.
|
|
Bring back the behavior in 3.x that was left out by oversight.
|
|
|
|
GDScript: Fix inheritance check of @onready for inner classes
|
|
Fix @export_multiline for PackedStringArray
|
|
|
|
Fix unreachable code warning for elif block
|
|
GDScript: Don't allow @onready without inheriting Node
|
|
|
|
|
|
GDScript: Add warnings that are set to error by default (take 2)
|
|
|
|
|
|
- Adds a list of default levels for all warning so they can be set
individually.
- Add warnings set by default to error for:
- Using `get_node()` without `@onready`.
- Using `@onready` together with `@export`.
- Inferring a static type with a Variant value.
- Overriding a native engine method.
- Adjust how annotations to ignore warnings are treated so they also
apply to method parameters.
- Clean up a bit how ignored warnings are set. There were two sets but
only one was actually being used.
- Set all warnings to the `WARN` level for tests, so they they can be
properly tested.
- Fix enum types in native methods signatures being set to `int`.
- Fix native enums being treated as Dictionary by mistake.
- Make name of native enum types use the class they are defined in, not
the direct super class of the script. This ensures they are always
equal even when coming from different sources.
- Fix error for signature mismatch that was only showing the first
default argument as having a default. Now it shows for all.
|
|
|
|
This reverts commit a166833bfa23a21a7bff196a85a20b014e7c1396.
This caused multiple regressions.
Needs to be redone with more testing before merge.
Fixes #72501.
|
|
- Adds a list of default levels for all warning so they can be set
individually.
- Add warnings set by default to error for:
- Using `get_node()` without `@onready`.
- Using `@onready` together with `@export`.
- Inferring a static type with a Variant value.
- Overriding a native engine method.
- Adjust how annotations to ignore warnings are treated so they also
apply to method parameters.
- Clean up a bit how ignored warnings are set. There were two sets but
only one was actually being used.
- Set all warnings to the `WARN` level for tests, so they they can be
properly tested.
- Fix enum types in native methods signatures being set to `int`.
- Fix native enums being treated as Dictionary by mistake.
- Make name of native enum types use the class they are defined in, not
the direct super class of the script. This ensures they are always
equal even when coming from different sources.
- Fix error for signature mismatch that was only showing the first
default argument as having a default. Now it shows for all.
|
|
|
|
|
|
The check for existence of `return` only existed on debug builds for
match branches. This could lead on an invalid error after exporting. Now
this is checked on relase too, so it works the same as the editor.
|
|
GDScript: Fix `@export_enum` works only with `int`
|
|
|
|
GDScript: Fix broken export group annotations
|
|
|
|
To restore an ability available in 3.x and reduce compatibility changes.
|
|
|
|
|
|
Closes https://github.com/godotengine/godot/issues/71065
|
|
|
|
GDScript: Remove function of `continue` for match statement
|
|
The keyword is confusing and rarely is used in the intended way. It is
removed now in favor of a future feature (pattern guards) to avoid
breaking compatibility later.
|
|
This is using an adapted version of UAX#31 to not rely on the ICU
database (which isn't available in builds without TextServerAdvanced).
It allows most characters used in diverse scripts but not everything.
|
|
|
|
Make script annotations be placed before `class_name` and `extends`
|
|
Implement export_multiline support for Array[String] and Dictionary
|
|
|
|
GDScript enum fixes & refactor
|
|
|
|
GDScript: Fix multiline and trailing comma for assert
|
|
|
|
|
|
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.
It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).
We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).
Also fixed "cf." Frenchism - it's meant as "refer to / see".
|
|
|
|
For arrays, specifically check if it's a string array and pass the
type on to the editor. For dictionaries, save the hint on the type and
use it later to draw the multiline editor, except for when adding a
string key, because that doesn't make much sense. All string values
however will be drawn as multiline.
|
|
|