Skip to content

ROS2 Ament Task Provider

Provides problem matchers for use with ROS2 projects using the ament build system.

Features

Provides the following problem matchers:

  • $ament-cpplint — adds errors and warnings reported by ament_cpplint
  • $ament-cppcheck — adds errors and warnings reported by ament_cppcheck
  • $ament-lint-cmake — adds errors and warnings reported by ament_lint_cmake
  • $ament-flake8 — adds errors and warnings reported by ament_flake8
  • $ament-pep257 — adds errors and warnings reported by ament_pep257
  • $ament-xmllint — adds errors and warnings reported by ament_xmllint

Usage

demo

Task panel

Required setup You must have the ament linters installed on your system for the appropriate linter to run.

sudo apt-get install ros-$ROS_DISTRO-ament-lint

From the task panel select ament and then the linter you'd like to run.

That's it!

Task configuration

You can also save the configuration within your workspace like so:

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "ament",
      "task": "cppcheck", // The name of the problem matcher
      "path": "src/", // The path to your source files
      "commandOptions": "", // Optional additional command line options
      "problemMatcher": [
        "$ament_cppcheck" // the corresponding problem matcher - can be used independently
      ],
      "label": "ament: cppcheck"
    }
  ]
}

License

This software is licensed under Apache 2.0.

Attributions

Leaf icons created by Freepik - Flaticon