Skip to content

Extend the catkin command to run "catkin tidy". This will apply clang tidy coding rules.

Notifications You must be signed in to change notification settings

nyxrobotics/catkin_tidy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

catkin_tidy

Run clang-tidy with catkin command

usage

  • Build with clang
catkin clang_build <package_name>
  • Format with clang-tidy
    • Source files will be overwritten, so be sure to make a backup before executing
    • If the naming modification is complex, it may not be possible to fully modify the naming. In such cases, please manually modify them by looking at the diffs
catkin clang_tidy <package_name>

install

  • install clang
    • Ubuntu 18.04
    sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic main'
    wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
    sudo apt install -y clang-format-13 clang-tidy-13
    
    • Ubuntu 20.04
    sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
    wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
    sudo apt install -y clang-format-13 clang-tidy-13
    
  • setup catkin_tidy
mkdir -p ~/lib
cd ~/lib
git clone https://github.com/nyxrobotics/catkin_tidy.git
cd catkin_tidy
pip install .

uninstall

pip uninstall catkin-tidy -y

Reference

About

Extend the catkin command to run "catkin tidy". This will apply clang tidy coding rules.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages