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

Fix all clang-tidy warnings / update clang-tidy configuration #35

Closed
tristan0x opened this issue Jan 21, 2019 · 0 comments
Closed

Fix all clang-tidy warnings / update clang-tidy configuration #35

tristan0x opened this issue Jan 21, 2019 · 0 comments
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers

Comments

@tristan0x
Copy link
Member

There are a couple of warnings raised by clang-tidy. We should fix the one that applies to basalt, and ignores those commit from third-parties.

Also update clang-tidy configuration according to Jason Turner recommandation

If possible make .clang-tidy configuration file generic (without hard-coded paths of include-directories to excludes for instance) so that it can be used later for every C++ project.

Waits for #32 to be merged as it provides small change regarding arguments given to clang-tidy by CMake.

@tristan0x tristan0x added bug Something isn't working enhancement New feature or request good first issue Good for newcomers labels Jan 21, 2019
@lkeegan lkeegan self-assigned this Jan 21, 2019
lkeegan added a commit that referenced this issue Jan 22, 2019
- added majority of available clang-tidy checks

Changed code for the following types of warnings:
- pass by const ref -> pass by copy & std::move
- if {return} else {return} -> if {return} return
lkeegan added a commit that referenced this issue Jan 23, 2019
- added majority of available clang-tidy checks
- disabled make_unique warnings as basalt uses C++11
- added SYSTEM to 3rd party CMake include_directories

Changed code for the following types of warnings:
- pass by const ref -> pass by copy & std::move
- if {return} else {return} -> if {return} return
- added some // NOLINTS to reduce third party warnings
- global static const -> functions returning ref to static var
- non-const ref as parameter -> pointer
lkeegan added a commit that referenced this issue Jan 24, 2019
- added majority of available clang-tidy checks
- disabled make_unique warnings as basalt uses C++11
- disabled google-runtime-references
- added SYSTEM to 3rd party CMake include_directories

Changed code for the following types of warnings:
- pass by const ref -> pass by copy & std::move
- if {return} else {return} -> if {return} return
- added some // NOLINTS(..) to reduce third party warnings
- global static const -> functions returning ref to static var
- raw owning pointers -> unique_ptrs
- using namespace X -> using X::Y
lkeegan added a commit that referenced this issue Jan 24, 2019
- added majority of available clang-tidy checks
- disabled make_unique warnings as basalt uses C++11
- disabled google-runtime-references
- disabled clang-diagnostic-ignored-optimization-argument
- added SYSTEM to 3rd party CMake include_directories

Changed code for the following types of warnings:
- pass by const ref -> pass by copy & std::move
- if {return} else {return} -> if {return} return
- added some // NOLINTS(..) to reduce third party warnings
- global static const -> functions returning ref to static var
- raw owning pointers -> unique_ptrs
- using namespace X -> using X::Y

Code now compiles without any clang-tidy warnings for:
- clang6
- clang7
- gcc7
lkeegan added a commit that referenced this issue Jan 24, 2019
- added majority of available clang-tidy checks
- disabled make_unique warnings as basalt uses C++11
- disabled google-runtime-references
- disabled clang-diagnostic-ignored-optimization-argument
- .clang-tidy list of checks now one item per line
- added SYSTEM to 3rd party CMake include_directories

Changed code for the following types of warnings:
- pass by const ref -> pass by copy & std::move
- if {return} else {return} -> if {return} return
- added some // NOLINTS(..) to reduce third party warnings
- global static const -> functions returning ref to static var
- raw owning pointers -> unique_ptrs
- using namespace X -> using X::Y
- added more // NOLINTs to supress catch2 warnings

Code now compiles without any clang-tidy warnings for:
- clang6
- clang7
- gcc7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants