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

Wrong result for header file #1

Open
keineahnung2345 opened this issue Nov 9, 2021 · 1 comment
Open

Wrong result for header file #1

keineahnung2345 opened this issue Nov 9, 2021 · 1 comment

Comments

@keineahnung2345
Copy link

Hi,

I have a class in my source file, and its name is falsely reported as violating variable naming rule, the log is like:

    [Line 29, Col 0]: Variable 'XxxYyyZzz' does not match '^([a-z0-9]+)([A-Z0-9][a-z0-9]*)*$'

And following is part of my .cppstyle:

naming:
    classes: ^([A-Z][a-z0-9]*)+$
    variables: ^([a-z0-9]+)([A-Z0-9][a-z0-9]*)*$

By checking the function to_node in parser.py, it seems the kind of my class is CursorKind.VAR_DECL so it will return a Variable object.

Have you met this problem before? Thanks.

@keineahnung2345 keineahnung2345 changed the title Class name is checked by variables-naming rule Wrong result for header file Nov 9, 2021
@keineahnung2345
Copy link
Author

I later found there are unittests and their behaviors are great. After playing with one of the test scripts, I found that it gives correct result for cpp file, but give wierd result for h file.

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

1 participant