godotengine / godotengine/godot

Unused parameters show underscore prefix in documentation

Open
#89,688 4 comments 0 reactions 0 assignees View on GitHub
discussion documentation topic:editor topic:gdscript
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.3.dev5.official

### System information

Windows 11, v4.3.dev5.official

### Issue description

When creating a virtual function in a base class, Godot creates a warning that parameters are unused and suggests prefixing them with `_`. However in the class' documentation the parameters include those underscores, which doesn't follow convention.

### Steps to reproduce

Add this function to any class:
```gdscript
func _my_virtual_function(_unused: int) -> void:
pass
```
Check the class' documentation and see the parameter is named `_unused`.

### Minimal reproduction project (MRP)

N/A

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the documented virtual function example in Godot v4.3.dev5.official and inspect how its class documentation renders parameter names. Confirm that unused parameters with an underscore prefix are displayed according to the project's naming convention, then verify the result with an equivalent virtual-function example.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.