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

False positive when includes are not together in the .cpp file. #150

Open
anirudh234 opened this issue Sep 25, 2019 · 1 comment
Open

False positive when includes are not together in the .cpp file. #150

anirudh234 opened this issue Sep 25, 2019 · 1 comment

Comments

@anirudh234
Copy link

anirudh234 commented Sep 25, 2019

If the includes are not bunched together in the code, cppclean fails to identify some includes that are present and raises a warning.

Example:


#include "file.h"
#include <algorithm>

#include "file2.h"
#include "file3.h"

Error:
file.cc: should #include header file 'file.h'

@Cyphall
Copy link

Cyphall commented Jul 31, 2022

Same problem here.

With this example:

D:
└───testlib
    └───src
        └───testlib
            └───test.cpp
            └───test.h

test.h:

#pragma once

void Test();

test.cpp:

#include "testlib/test.h"

void Test()
{
	
}

If I run python "C:/Program Files/Python39/Scripts/cppclean" --include-path-non-system="D:/testlib/src" . from the src folder, I get the following result:

.\testlib\test.cpp: should #include header file '.\testlib\test.h'

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