From 9eed519faab7ed24fd0f562b05405af7734e8072 Mon Sep 17 00:00:00 2001 From: a3d4 Date: Wed, 22 Jul 2020 03:57:18 +0200 Subject: [PATCH] Introduce white list of error codes, which are not covered by tests --- scripts/error_codes.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/error_codes.py b/scripts/error_codes.py index 8ab9b04dc..eaf401cb0 100755 --- a/scripts/error_codes.py +++ b/scripts/error_codes.py @@ -186,6 +186,16 @@ def examine_id_coverage(top_dir, source_id_to_file_names): # Warning (3420): Source file does not specify required compiler version! test_ids |= find_ids_in_cmdline_test_err(path.join(top_dir, "test", "cmdlineTests", "error_codes", "err")) + # white list of ids which are not covered by tests + white_ids = { + "3805", # "This is a pre-release compiler version, please do not use it in production." + # The warning may or may not exist in a compiler build. + "4591" # "There are more than 256 warnings. Ignoring the rest." + # Due to 3805, the warning lists look different for different compiler builds. + } + assert len(test_ids & white_ids) == 0, "The sets are not supposed to intersect" + test_ids |= white_ids + print(f"IDs in source files: {len(source_ids)}") print(f"IDs in test files : {len(test_ids)} ({len(test_ids) - len(source_ids)})") print()