Module Name:    src
Committed By:   rillig
Date:           Sat Nov 20 13:07:57 UTC 2021

Modified Files:
        src/tests/usr.bin/indent: t_options.awk

Log Message:
indent/tests: make warning for empty lines more helpful


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/t_options.awk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/indent/t_options.awk
diff -u src/tests/usr.bin/indent/t_options.awk:1.5 src/tests/usr.bin/indent/t_options.awk:1.6
--- src/tests/usr.bin/indent/t_options.awk:1.5	Sat Nov 20 11:13:18 2021
+++ src/tests/usr.bin/indent/t_options.awk	Sat Nov 20 13:07:57 2021
@@ -1,4 +1,4 @@
-# $NetBSD: t_options.awk,v 1.5 2021/11/20 11:13:18 rillig Exp $
+# $NetBSD: t_options.awk,v 1.6 2021/11/20 13:07:57 rillig Exp $
 #
 # Copyright (c) 2021 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -116,8 +116,9 @@ section == "" {
 	else {
 		if (curr_empty_lines > 0) {
 			if (prev_empty_lines > 1)
-				warn(NR - curr_empty_lines,
-				    "excess empty lines a few lines above")
+				warn(NR - curr_empty_lines - 1,
+				    prev_empty_lines " empty lines a few " \
+				    "lines above, should be only 1")
 			prev_empty_lines = curr_empty_lines
 		}
 		curr_empty_lines = 0

Reply via email to