Skip to content

Commit afa535a

Browse files
Merge pull request #4599 from bruntib/cppcheck_unusedfunction_fix
[fix] Cppcheck suppress unusedFunction checker only once
2 parents 3adcfef + 0f9af39 commit afa535a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • analyzer/codechecker_analyzer/analyzers/cppcheck

analyzer/codechecker_analyzer/analyzers/cppcheck/analyzer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ def construct_analyzer_cmd(self, result_handler):
219219

220220
# unusedFunction check is for whole program analysis,
221221
# which is not compatible with per source file analysis.
222-
analyzer_cmd.append('--suppress=unusedFunction')
222+
if '--suppress=unusedFunction' not in analyzer_cmd:
223+
analyzer_cmd.append('--suppress=unusedFunction')
223224

224225
# Add extra arguments.
225226
analyzer_cmd.extend(config.analyzer_extra_arguments)

0 commit comments

Comments
 (0)