ros-industrial / industrial_ci

Easy continuous integration repository for ROS repositories
Apache License 2.0
247 stars 129 forks source link

Install llvm repository for newer versions of clang-format #877

Open dave992 opened 1 month ago

dave992 commented 1 month ago

Using CLANG_FORMAT_VERSION we can specify which clang-format version to use. This assumes the version is available via apt.

I wanted to be able to use more recent versions of clang-format uniformly across multiple different ROS versions. Being limited to what is available for the base image is somewhat restrictive in this case. Furthermore, the packages that are included in Ubuntu are quite old.

The proposed changes check if the requested version is available via apt. If not, it will install the requested version using the Automatic installation script recommended by https://apt.llvm.org/