File: warn.ha

package info (click to toggle)
hare-update 0.26.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,044 kB
  • sloc: makefile: 37; sh: 14
file content (11 lines) | stat: -rw-r--r-- 265 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
use fmt;

// Print a warning to the console.
export fn warning(ctx: *context, rule: *rule, warn: str) void = {
	if (ctx.engine.yes || rule.remember >= 0) {
		return;
	};
	fmt::fprintfln(ctx.engine.tty,
		"{}{}Warning: {}{}",
		C_YELLOW, C_BOLD, warn, C_RESET)!;
};