Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modern c++ #11

Open
heuristicus opened this issue Jul 2, 2020 · 1 comment
Open

Use modern c++ #11

heuristicus opened this issue Jul 2, 2020 · 1 comment

Comments

@heuristicus
Copy link

Smart pointers etc.

@heuristicus
Copy link
Author

heuristicus commented Jul 9, 2020

Using some stuff from https://www.kdab.com/clang-tidy-part-1-modernize-source-code-using-c11c14/

Compile the code with catkin build procman_ros -DCMAKE_EXPORT_COMPILE_COMMANDS=ON. This creates a compile_commands.json in catkin_ws/build/procman_ros. In that directory you can use run-clang-tidy to apply clang-tidy to the whole codebase, e.g. run-clang-tidy -checks='modernize*'.

Some of the checks can apply automatic fixes, to do this need to specify the path to the replacement binary and use -fix.

run-clang-tidy -clang-apply-replacements-binary /usr/bin/clang-apply-replacements -fix -checks='modernize*' -quiet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant