[style] clang-tidy misc enhancements (#5695)

This commit introduces misc clang-tidy enhancements:
- Avoid creating symlinks in /usr/bin directory
- Search for clang-tidy-10 executables
- Fix potential bootstrap fail: permission denied in /opt directory
This commit is contained in:
Simon Lin
2020-10-23 10:25:55 -07:00
committed by GitHub
parent e00e5b3d70
commit de6d0e883e
4 changed files with 89 additions and 6 deletions
+1 -3
View File
@@ -49,7 +49,7 @@ install_packages_apt()
sudo apt-get --no-install-recommends install -y binutils-arm-none-eabi gcc-arm-none-eabi gdb-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
elif [ "$PLATFORM" = "Ubuntu" ]; then
sudo apt-get --no-install-recommends install -y ca-certificates wget
(cd /opt \
(cd /tmp \
&& wget -c https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 \
&& tar xjf gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 \
&& rm gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 \
@@ -60,8 +60,6 @@ install_packages_apt()
# add clang-format and clang-tidy for pretty
sudo apt-get --no-install-recommends install -y clang-format-10 clang-tidy-10
sudo ln -sf /usr/bin/clang-tidy-10 /usr/bin/clang-tidy
sudo ln -sf /usr/bin/clang-apply-replacements-10 /usr/bin/clang-apply-replacements
# add yapf for pretty
python3 -m pip install yapf==0.29.0 || echo 'WARNING: could not install yapf, which is useful if you plan to contribute python code to the OpenThread project.'