Вопрос

i want to be able to write 2 sets of rules:

  1. Ruleset which ignores errors like

    • Uninitialized variable
    • variableScope
  2. Ruleset which includes ALL , but i can manually ignore one or more rule sets

Keeping in view that :

cppcheck will check for memory leaks. For classes the checking is only made if "--all" is given. The reason is that there will be false positives if an instance is deallocated automatically.

Это было полезно?

Решение

In Cppcheck terminology.. a rule is a user-defined pattern that Cppcheck should look out for in the code and report about.

1.Ruleset which ignores errors like

Use suppressions. See --suppression-list and --suppress. You can use -i to skip entire files.

2.Ruleset which includes ALL , but i can manually ignore one or more rule sets

Use --enable.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top