banner_comment
Finds a comment that is only a line of -, = or * fencing off a section.
Category style, warn by default.
#import "Basic";
// -----------------------------------------------------------------------------
// Helpers
double :: (n: int) -> int {
return n * 2;
}
main :: () {
print("%\n", double(4));
}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#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 (// ------).