Esc

unused_private_declaration

Finds a #scope_file declaration that nothing in its file uses.

Category suspicious, warn by default.

Example
#import "Basic";

main :: () {
    print("hello\n");
}

#scope_file

LIMIT :: 64;
Diagnostic
warning[unused_private_declaration]: `LIMIT` is private to this file and nothing in the file uses it
  --> example.jai:9:1
   |
 9 | LIMIT :: 64;
   | ^^^^^
   |
   = help: delete it, or put it under `#scope_export` if another file should use it
   = note: `unused_private_declaration` is `warn` by default
Fixed
#import "Basic";

main :: () {
    print("hello\n");
}

A procedure, struct, enum, constant or variable declared after #scope_file whose name appears nowhere else in its file (mentions in its own declaration do not count, so a procedure that only calls itself is unused; mentions in code an #if left out do).