1 // Policy used in Coverity tests.
3 // Generates UNCALLED defects for functions which are not called by any test.
4 // Generates INSUFFICIENT_COVERAGE defects for functions which do not have
6 // Generates INSUFFICIENT_FILE_COVERAGE defects for files which do not
7 // have 100% line coverage.
9 // The line immediately following a coverity[TA.COVERAGE] annotation
10 // (i.e. in source code comments) is ignored for coverage purposes.
11 // Lines with xnocover annotations are ignored for coverage purposes.
13 type: "Coverity test policy definition",
15 recent_date_cutoff: "2012-03-07", // 6.1.0
16 old_date_cutoff: "2010-12-14", // 6.0.0
19 violation_name: "INSUFFICIENT_COVERAGE",
20 aggregation_granularity: "function",
21 minimum_line_coverage_pct: 100,
22 use_filters: [ "exclude_annotated_lines", "executed_code", "focus_on_my_source", "exclude_logging_code", "exclude_throw_statements", "exclude_error_handlers" ]
27 filter_name: "executed_code",
30 exclusion_reason: "unexecuted code",
35 filter_name: "exclude_annotated_lines",
39 { line_regex: "coverity\\[TA\\.COVERAGE\\]", line_offset: -1 },
40 { line_regex: "xnocover" },
42 exclusion_reason: "coverage annotation",
47 filter_name: "exclude_logging_code",
51 { line_regex: "ACE_DEBUG" },
52 { line_regex: "ACE_ERROR" },
53 { line_regex: "ACE_ERROR_RETURN" },
54 { line_regex: "ACELIB_DEBUG" },
55 { line_regex: "ACELIB_ERROR" },
56 { line_regex: "ACELIB_ERROR_RETURN" },
57 { line_regex: "TAOLIB_DEBUG" },
58 { line_regex: "TAOLIB_ERROR" },
59 { line_regex: "TAOLIB_ERROR_RETURN" },
60 { line_regex: "TAO_debug_level" },
61 { line_regex: "ORBSVCS_DEBUG" },
62 { line_regex: "ORBSVCS_ERROR" },
63 { line_regex: "ORBSVCS_ERROR_RETURN" },
64 { line_regex: "VDBG" },
65 { line_regex: "VDBG_LVL" },
66 { line_regex: "Transport_debug_level" },
67 { line_regex: "_tao_print_exception" },
69 exclusion_reason: "policy indicates no need to test logging code",
74 filter_name: "exclude_throw_statements",
77 { exclusion_reason: "on throw path",
80 dominated_by_astnode: {
81 expression_kind: "throw" ,
89 filter_name: "exclude_error_handlers",
92 { not: { line_regex: "return\\s+-1" },
93 exclusion_reason: "policy indicates no need to test error handlers",
98 filter_name: "focus_on_my_source",
101 exclusion_reason: "outside interesting source locations",
104 { file_name_regex: ".*/ACE/ace/.*" },
105 { file_name_regex: ".*/DDS/dds/DCPS/.*" },
106 { file_name_regex: ".*/TAO/tao/.*" },
107 { file_name_regex: ".*/TAO/orbsvcs/orbsvcs/Naming/.*" },
108 { file_name_regex: ".*/TAO/orbsvcs/orbsvcs/Notify/.*" },
109 { file_name_regex: ".*/TAO/orbsvcs/orbsvcs/Event/.*" }