Skip to content

Commit

Permalink
Enable additional GDScript warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Jul 5, 2024
1 parent 969b9c3 commit 63f9bc9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gui/screens/licenses/licenses.gd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func _godot_licenses() -> String:
for component in copyright_info:
var component_name: String = component["name"]
var parts: Array = component["parts"]
for part in parts:
for part: Dictionary in parts:
var _files: Array = part["files"]
var copyright: Array = part["copyright"]
var license: String = part["license"]
Expand All @@ -33,7 +33,7 @@ func _godot_licenses() -> String:
result += "\n\n# Licenses"

var licenses := Engine.get_license_info()
for license_name in licenses:
for license_name: String in licenses:
var text: String = licenses[license_name]
result += "\n\n## " + license_name + "\n\n" + text.strip_edges()

Expand Down
3 changes: 2 additions & 1 deletion gui/screens/main_menu/main_menu.gd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ func _set_currently_toggled(index: ToggleState) -> void:
self._buttons_by_state[index].button_pressed = true
self._currently_toggled = index

var node: Control = self._scenes_by_state[index].instantiate()
var scene: PackedScene = self._scenes_by_state[index]
var node: Control = scene.instantiate()
self.content_container.add_child(node)
self._current_view = node

Expand Down
11 changes: 11 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ config/icon="res://gui/images/icon.svg"
UserPreferences="*res://user/user_preferences.gd"
MathUtils="*res://utils/math_utils.gd"

[debug]

gdscript/warnings/property_used_as_function=2
gdscript/warnings/constant_used_as_function=2
gdscript/warnings/function_used_as_property=2
gdscript/warnings/untyped_declaration=1
gdscript/warnings/unsafe_property_access=1
gdscript/warnings/unsafe_method_access=1
gdscript/warnings/unsafe_cast=1
gdscript/warnings/unsafe_call_argument=1

[display]

window/size/viewport_width=3840
Expand Down

0 comments on commit 63f9bc9

Please sign in to comment.