Skip to content

Enable usage of custom Clang-Tidy version #839

@ardabbour

Description

@ardabbour

It would be great to use a custom version of Clang-Tidy, especially given that clang-tidy-10, which is the default version of ubuntu:20.04, raises a clang-diagnostic-error on several actionlib headers. As a workaround, one can do something like this:

variables:
  BEFORE_CLANG_TIDY_CHECKS : |
    if [ "$EUID" -ne 0 ] && command -v sudo > /dev/null; then
      sudo apt-get -qq install -y --no-upgrade --no-install-recommends clang-tidy-12
      sudo ln -sf $(which clang-tidy-12) $(which clang-tidy)
    else
      apt-get -qq install -y --no-upgrade --no-install-recommends clang-tidy-12
      ln -sf $(which clang-tidy-12) $(which clang-tidy)
    fi

But it would waste less CI minutes and overall be cleaner if there was a way to choose the Clang-Tidy version of interest, as is done with Clang-Format.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions