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

Add clang-tidy support #403

Merged
merged 3 commits into from
Jun 8, 2018
Merged

Add clang-tidy support #403

merged 3 commits into from
Jun 8, 2018

Conversation

madebr
Copy link
Contributor

@madebr madebr commented Mar 6, 2018

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.

@madebr madebr changed the title Clangtidy Add clang-tidy support Mar 6, 2018
@ghost
Copy link

ghost commented Mar 6, 2018

As far remember, we should be careful with auto. To made bit_cast simpler I used implicit conversion.

endif()
set(CLANGTIDY_ARGS "${CLANGTIDY_PROGRAM}")
list(APPEND CLANGTIDY_ARGS
"-style=file"
Copy link

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"?

Copy link
Contributor Author

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.

Copy link

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".

Copy link
Contributor Author

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.

Copy link

@ghost ghost left a 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. ;)

@darkf darkf merged commit 10b18da into rwengine:master Jun 8, 2018
@madebr madebr deleted the clangtidy branch June 8, 2018 14:55
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

Successfully merging this pull request may close these issues.

2 participants