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

Forward declaration of function masks errors in class #68

Open
msmolens opened this issue May 18, 2017 · 4 comments
Open

Forward declaration of function masks errors in class #68

msmolens opened this issue May 18, 2017 · 4 comments

Comments

@msmolens
Copy link

With KWStyle.xml:

<?xml version="1.0" encoding="iso-8859-1"?>
<Description>
<InternalVariables>m_[A-Z],0,1</InternalVariables>
</Description>

and Test.h:

#ifndef Test_h
#define Test_h

// Forward declaration
bool runTest();

class Test
{
public:
    Test() {}

protected:
    bool result;
};

#endif

KWStyle fails to show the error in the name of the member variable.

Without the forward declaration the error is detected correctly:

$ KWStyle -xml KWStyle.xml -v Test.h -gcc
Test.h:0: error: Internal variable (result) doesn't match regular expression (m_[A-Z])

The forward declaration shouldn't mask errors in the class below.

Tested with e03980f.

@wasim6691
Copy link

dude the variable naming inside the class should be as member variable i.e. m_bool .. something like that .. m_ as prefix for variables.

@aylward
Copy link
Contributor

aylward commented Feb 21, 2020 via email

@wasim6691
Copy link

please close the issue if possible. many thnaks

@aylward
Copy link
Contributor

aylward commented Feb 24, 2020 via email

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

3 participants