Skip to content

Enable CppCheck in MoveIt2 #897

Closed
Closed

Description

@Abishalini

CppCheck is a static analysis tool that can detect undefined behavior like

  • Dead pointers
  • Division by zero
  • Integer overflows
  • Invalid bit shift operands
  • Invalid conversions
  • Invalid usage of STL
  • Memory management
  • Null pointer dereferences
  • Out of bounds checking
  • Uninitialized variables
  • Writing const data

Currently, CppCheck is disable for this codebase by adding this line in CMakeLists

set(ament_cmake_cppcheck_FOUND TRUE)

It would be nice to add this back. This task can be done incrementally by enabling CppCheck for each library in moveit_ros and moveit_core separately.

Activity

  1. added
    enhancement
    good first issue
    on Dec 8, 2021
  2. Abishalini commented on Feb 8, 2022

    @Abishalini
    ContributorAuthor

    A good starting place is our tutorials website.
    The tutorials are continuously being improved and if you run into any issues, feel free to open an issue in the tutorials repository.

    One of my colleague also posted a few YouTube videos that walks you through the tutorials.

    As for this issue, CppCheck is disabled for multiple components of MoveIt2. Chose any component (like moveit_core) and delete the following line from the CMakeLists.txt

    set(ament_cmake_cppcheck_FOUND TRUE)
    

    Building your workspace after this change should show you errors that CppCheck detects in that package. If you fix all the errors, create a pull request with your changes.

  3. henningkayser commented on Jun 2, 2022

    @henningkayser
    Member

    cppcheck has been enabled with #1224

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions