-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add clang-tidy support #403
Conversation
As far remember, we should be careful with auto. To made bit_cast simpler I used implicit conversion. |
cmake_configure.cmake
Outdated
endif() | ||
set(CLANGTIDY_ARGS "${CLANGTIDY_PROGRAM}") | ||
list(APPEND CLANGTIDY_ARGS | ||
"-style=file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be here "-format-style=file"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs on http://clang.llvm.org/extra/clang-tidy/ show a -format-style=file
option.
The version installed by fedora 26 does not have that option (version 4.0.1).
This maybe requires a FindClangTidy.cmake
module if this option has changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On arch I have to use "-format-style=file".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe to have fixed it.
893d7ce
to
5c8e978
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's time to think about travis worker. ;)
This PR adds the clang-tidy linter to openrw.
All clang-tidy checks are enabled by default.
See http://clang.llvm.org/extra/clang-tidy/
Enabling clang-tidy autofix might result in incorrect source code, so manual checking is required.