| 326 | } |
| 327 | |
| 328 | void Settings::setCheckLevel(CheckLevel level) |
| 329 | { |
| 330 | if (level == CheckLevel::reduced) { |
| 331 | // Checking should finish quickly. |
| 332 | checkLevel = level; |
| 333 | vfOptions.maxSubFunctionArgs = 8; |
| 334 | vfOptions.maxIfCount = 100; |
| 335 | vfOptions.doConditionExpressionAnalysis = false; |
| 336 | vfOptions.maxForwardBranches = 4; |
| 337 | vfOptions.maxIterations = 1; |
| 338 | } |
| 339 | else if (level == CheckLevel::normal) { |
| 340 | // Checking should finish in reasonable time. |
| 341 | checkLevel = level; |
| 342 | vfOptions.maxSubFunctionArgs = 8; |
| 343 | vfOptions.maxIfCount = 100; |
| 344 | vfOptions.doConditionExpressionAnalysis = false; |
| 345 | vfOptions.maxForwardBranches = 4; |
| 346 | } |
| 347 | else if (level == CheckLevel::exhaustive) { |
| 348 | // Checking can take a little while. ~ 10 times slower than normal analysis is OK. |
| 349 | checkLevel = CheckLevel::exhaustive; |
| 350 | vfOptions.maxIfCount = -1; |
| 351 | vfOptions.maxSubFunctionArgs = 256; |
| 352 | vfOptions.doConditionExpressionAnalysis = true; |
| 353 | vfOptions.maxForwardBranches = -1; |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | // These tables are auto generated from Cppcheck Premium script |
| 358 |
no outgoing calls
no test coverage detected