Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/indent indent/tests: make warning for empty li...
details: https://anonhg.NetBSD.org/src/rev/736a5c27dcb6
branches: trunk
changeset: 1026364:736a5c27dcb6
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Nov 20 13:07:57 2021 +0000
description:
indent/tests: make warning for empty lines more helpful
diffstat:
tests/usr.bin/indent/t_options.awk | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (21 lines):
diff -r 6cac3754677b -r 736a5c27dcb6 tests/usr.bin/indent/t_options.awk
--- a/tests/usr.bin/indent/t_options.awk Sat Nov 20 11:13:18 2021 +0000
+++ b/tests/usr.bin/indent/t_options.awk Sat Nov 20 13:07:57 2021 +0000
@@ -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 @@
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
Home |
Main Index |
Thread Index |
Old Index