Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
CI_Source CI_Source
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Metrics
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Support
  • CI_SourceCI_Source
  • Merge requests
  • !13

Closed
Created Dec 17, 2021 by Ben Avison@bavisonDeveloper
  • Report abuse
Report abuse

Allow additional flags to be passed to cppcheck

  • Overview 0
  • Commits 3
  • Pipelines 2
  • Changes 1

These can be specified in the .gitlab-ci.yml file (or if launching a pipeline manually, via CI/CD -> Pipelines -> Run pipeline) using the CPPCHECK_EXTRA variable. It is anticipated that this will be most useful for specifying additional --suppress arguments.

Because library components routinely feature functions that are not called from elsewhere within the library itself, the unusedFunction warning is very commonly encountered in these components. To reduce the number of times this needs to be specified in .gitlab-ci.yml files, CPPCHECK_EXTRA defaults to --suppress-unusedFunction if it is unset for a library.

Because libraries are often listed as type C in ModuleDB, we instead inspect the component name to see if it ends with Lib in order to activate this functionality.

To avoid merge conflicts, this MR is not based on master: you should merge !12 first.

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: cppcheck-additional