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 issues found with cppclean #730

Closed
pamapa opened this issue Mar 8, 2020 · 4 comments
Closed

fix issues found with cppclean #730

pamapa opened this issue Mar 8, 2020 · 4 comments
Assignees
Milestone

Comments

@pamapa
Copy link
Member

pamapa commented Mar 8, 2020

https://github.com/myint/cppclean

cppclean can find the following:

  • Classes with virtual methods, no virtual destructor, and no bases
  • Global/static data that are potential problems when using threads
  • Functions that are declared but not defined
  • Unnecessary forward class declarations
  • Unnecessary function declarations
  • Undeclared function definitions
  • Unnecessary #includes in header files
    • No direct reference to anything in the header
    • Header is unnecessary if classes were forward declared instead
  • Inconsistent case in #includes (foo.h versus Foo.h)
@pamapa pamapa self-assigned this Mar 8, 2020
@pamapa
Copy link
Member Author

pamapa commented Mar 8, 2020

i plan to cleanup header handling like this:

example.cc:

/*
...
*/

#include "example.h" // API

#include <system headers_last>
...

#include "other_project_headers.h"
...

Like this our header files are self contained and do not depend included in a specific order.

@whyman
Copy link
Member

whyman commented Mar 8, 2020

Yay for the include tidy!

@whyman
Copy link
Member

whyman commented Mar 8, 2020

Once it's done consider a GitHub action to make sure it stays that way.

pamapa added a commit to pamapa/gerbera that referenced this issue Mar 14, 2020
pamapa added a commit to pamapa/gerbera that referenced this issue Mar 14, 2020
pamapa added a commit to pamapa/gerbera that referenced this issue Mar 14, 2020
pamapa added a commit to pamapa/gerbera that referenced this issue Mar 14, 2020
pamapa added a commit to pamapa/gerbera that referenced this issue Mar 14, 2020
@pamapa
Copy link
Member Author

pamapa commented Mar 14, 2020

cppclean shows many false positive, like this we can not add it to CI :-(

pamapa added a commit that referenced this issue Mar 15, 2020
pamapa added a commit that referenced this issue Mar 15, 2020
@pamapa pamapa added this to the v1.4.1 milestone Mar 15, 2020
pamapa added a commit to pamapa/gerbera that referenced this issue Mar 20, 2020
pamapa added a commit that referenced this issue Mar 21, 2020
@pamapa pamapa closed this as completed Mar 27, 2020
whorfin pushed a commit to whorfin/gerbera that referenced this issue May 26, 2020
whorfin pushed a commit to whorfin/gerbera that referenced this issue May 26, 2020
whorfin pushed a commit to whorfin/gerbera that referenced this issue May 26, 2020
whorfin pushed a commit to whorfin/gerbera that referenced this issue May 26, 2020
whorfin pushed a commit to whorfin/gerbera that referenced this issue May 26, 2020
whorfin pushed a commit to whorfin/gerbera that referenced this issue May 26, 2020
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

2 participants