diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-03-06 10:49:11 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-03-06 10:49:11 +0100 |
commit | 2a5fc1fe6cfe955990e96c73d1dfc0abae5e8d5d (patch) | |
tree | 359eba552ab231dd2f422075255f367324d319d6 /modules/gdscript/tests/scripts/analyzer/errors | |
parent | a18820a5da00d41e8581ae1b0b65983197e5ea21 (diff) | |
parent | ea5fd3d732a85029e8372425904971ad26153ff1 (diff) | |
download | redot-engine-2a5fc1fe6cfe955990e96c73d1dfc0abae5e8d5d.tar.gz |
Merge pull request #74306 from dalexeev/gds-var-colon-style
Fix GDScript code style regarding colon
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/errors')
8 files changed, 13 insertions, 13 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd index 62ac1c3108..900155569c 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.gd @@ -1,7 +1,7 @@ enum MyEnum { ENUM_VALUE_1, ENUM_VALUE_2 } enum MyOtherEnum { OTHER_ENUM_VALUE_1, OTHER_ENUM_VALUE_2 } -func enum_func(e : MyEnum) -> void: +func enum_func(e: MyEnum) -> void: print(e) func test(): diff --git a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd b/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd index dd2708b21d..63c080e583 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/native_freed_instance.gd @@ -4,4 +4,4 @@ func test(): x.free() var ok = x - var bad : Node = x + var bad: Node = x diff --git a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd index 4e75ded96a..c84a4ad8af 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/preload_enum_error.gd @@ -2,5 +2,5 @@ enum LocalNamed { VALUE_A, VALUE_B, VALUE_C = 42 } func test(): const P = preload("../features/enum_from_outer.gd") - var x : LocalNamed + var x: LocalNamed x = P.Named.VALUE_A diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd index f1be6aaa0c..35f506aabd 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_function_get_type_error.gd @@ -1,7 +1,7 @@ -var _prop : int +var _prop: int # Getter function has wrong return type. -var prop : String: +var prop: String: get = get_prop func get_prop(): diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd index dd190157a1..eedeea915d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_function_set_type_error.gd @@ -1,10 +1,10 @@ -var _prop : int +var _prop: int # Setter function has wrong argument type. -var prop : String: +var prop: String: set = set_prop -func set_prop(value : int): +func set_prop(value: int): _prop = value func test(): diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd index 7f2b29222a..90b00fbe13 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_get_type_error.gd @@ -1,7 +1,7 @@ -var _prop : int +var _prop: int # Inline getter returns int instead of String. -var prop : String: +var prop: String: get: return _prop diff --git a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd index 0ce239dbbd..5747b85fc7 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/property_inline_set_type_error.gd @@ -1,7 +1,7 @@ -var _prop : int +var _prop: int # Inline setter assigns String to int. -var prop : String: +var prop: String: set(value): _prop = value diff --git a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd b/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd index 758fbaccc9..b0cfdea75d 100644 --- a/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd +++ b/modules/gdscript/tests/scripts/analyzer/errors/script_freed_instance.gd @@ -7,4 +7,4 @@ func test(): x.free() var ok = x - var bad : A = x + var bad: A = x |