Esc

unused_parameter

Finds a parameter the procedure never uses.

Category style, warn by default.

Example
#import "Basic";

area_of :: (value: int, factor: int, label: string) -> int {
    return value * factor;
}

main :: () {
    print("%\n", area_of(2, 3, "six"));
}
Diagnostic
warning[unused_parameter]: unused parameter `label`
  --> example.jai:3:38
   |
 3 | area_of :: (value: int, factor: int, label: string) -> int {
   |                                      ^^^^^
   |
help: start its name with `_` if the signature must stay, or remove it
   |
 3 ~ area_of :: (value: int, factor: int, _label: string) -> int {
   |
   = note: `unused_parameter` is `warn` by default
Fixed
#import "Basic";

area_of :: (value: int, factor: int) -> int {
    return value * factor;
}

main :: () {
    print("%\n", area_of(2, 3));
}

Only for procedures whose every caller is in view: named, only called (never taken as a value), called at least once, not overloaded or exported, no #c_call/#foreign/#expand/notes.