From 4630fc75a7a9f61d53153452e5f3c13a8d7e3233 Mon Sep 17 00:00:00 2001 From: Nick Hamann Date: Sun, 12 Jul 2015 21:19:19 -0500 Subject: [PATCH] Add comments. --- src/etc/errorck.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/etc/errorck.py b/src/etc/errorck.py index 4f529f5632c..48736542f20 100644 --- a/src/etc/errorck.py +++ b/src/etc/errorck.py @@ -23,6 +23,15 @@ src_dir = sys.argv[1] errcode_map = {} error_re = re.compile("(E\d\d\d\d)") +# In the register_long_diagnostics! macro, entries look like this: +# +# EXXXX: r##" +# +# "##, +# +# These two variables are for detecting the beginning and end of diagnostic +# messages so that duplicate error codes are not reported when a code occurs +# inside a diagnostic message long_diag_begin = "r##\"" long_diag_end = "\"##" @@ -41,6 +50,7 @@ for (dirpath, dirnames, filenames) in os.walk(src_dir): inside_long_diag = False for line_num, line in enumerate(f, start=1): if inside_long_diag: + # Skip duplicate error code checking for this line if long_diag_end in line: inside_long_diag = False continue -- 2.44.0