Module Name: src
Committed By: rillig
Date: Sat Jan 2 01:12:39 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: check-msgs.lua
Log Message:
lint: fix typo in check-msgs tool
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/xlint/lint1/check-msgs.lua
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/check-msgs.lua
diff -u src/usr.bin/xlint/lint1/check-msgs.lua:1.4 src/usr.bin/xlint/lint1/check-msgs.lua:1.5
--- src/usr.bin/xlint/lint1/check-msgs.lua:1.4 Fri Jan 1 11:41:01 2021
+++ src/usr.bin/xlint/lint1/check-msgs.lua Sat Jan 2 01:12:38 2021
@@ -1,12 +1,12 @@
#! /usr/bin/lua
--- $NetBSD: check-msgs.lua,v 1.4 2021/01/01 11:41:01 rillig Exp $
+-- $NetBSD: check-msgs.lua,v 1.5 2021/01/02 01:12:38 rillig Exp $
--[[
-Check that the message text in the C source matches the actual user-visible
-message text.
+usage: lua ./check-msgs.lua *.c
-usage: ./check-diagnostics *.c
+Check that the message text in the comments of the C source code matches the
+actual user-visible message text in err.c.
]]
@@ -39,6 +39,7 @@ local function check_message(fname, line
msg = string.gsub(msg, "/%*", "**")
msg = string.gsub(msg, "%*/", "**")
msg = string.gsub(msg, "\\(.)", "%1")
+
comment = string.gsub(comment, "arg%.", "argument")
comment = string.gsub(comment, "bitop%.", "bitwise operation")
comment = string.gsub(comment, "comb%.", "combination")