Esc

banner_comment

Finds a comment that is only a line of -, = or * fencing off a section.

Category style, warn by default.

Example
#import "Basic";

// -----------------------------------------------------------------------------
// Helpers

double :: (n: int) -> int {
    return n * 2;
}

main :: () {
    print("%\n", double(4));
}
Diagnostic
warning[banner_comment]: this comment is only a line of rule characters
  --> example.jai:3:1
   |
 3 | // -----------------------------------------------------------------------------
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: drop the line, and name the section in one plain `//` line if it needs a name; a long section can move to its own file
   |
 3 - // -----------------------------------------------------------------------------
   |
   = note: `banner_comment` is `warn` by default
Fixed
#import "Basic";

// Helpers

double :: (n: int) -> int {
    return n * 2;
}

main :: () {
    print("%\n", double(4));
}

A comment of three or more of -=*#~_ and nothing else, line or block (// ------).