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/
Using
CLANG_FORMAT_VERSION
we can specify whichclang-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/