-
Notifications
You must be signed in to change notification settings - Fork 9
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
Unexpected findings #65
Comments
Hi @ruedbi : Glad to receive your reports. There are lots of information, something doesn't be checked, and an error(Q3). Seems something I forget to implement (struct, class, parameter, union). I will confirm it again with source code. Unimplemented functions I will create issues for them. About the error, I will try to duplicate later after those functions done. Reply you later. |
Hi @ruedbi: Sorry, reply you late, a little busy recently. 1. About the 1st issue about constructor is not check. 2. "Parameters" are reported without configuration that could be set 3. Add any namespace around the code in e.g. 10.2.concepts.cpp and the errors will melt down to a few only 4. I have some cases where cppnamelint stops after the first line of code. I cannot say when that happens, what the rule is? PS > type C:\petzone\cppnamelint\cppnamelint.git\source\test\sample\YouPlayGround.cpp
class BlaBla
{
int someVar;
};
PS > ./cppnamelint check C:\petzone\cppnamelint\cppnamelint.git\source\test\sample\YouPlayGround.cpp --config=C:\petzone\cppnamelint\cppnamelint.git\cppnamelint.toml
cppnamelint utility v0.3.4
---------------------------------------------------
File = YouPlayGround.cpp
Config = cppnamelint.toml
Checked = 1 [File:0 | Func: 0 | Param: 0 | Var: 1 | Enum: 0 | Struct: 0 | Union: 0 | Class: 1]
Error = 1 [File:0 | Func: 0 | Param: 0 | Var: 1 | Enum: 0 | Struct: 0 | Union: 0 | Class: 0]
------------------------------------------------------------
< 3, 1> Variable : someVar (int) |
thanks for checking ad 1): I understand that this means a change in cppnamelint (just to be sure)? Would be ok for me. ad 3) cppnamelint utility v0.3.4INFO : Log message will print to the file (y). File = 10.2.concepts.cpp
|
Hi @ruedbi About the |
not sure if I get you right |
According to the ad 3). The sample code in |
got it I'll try again with my code and see what I'll find |
I upgraded to 4883fa3
I tried another example that I appended. cppnamelint utility v0.3.4 File = simple.cpp
|
Hi @dougpuob, could you please give the simple.zip from above a try? BTW: I'm on 4883fa3 now, using Ubuntu 18.04. It very much looks like the simple.h is not included when clang tries to build the simple.cpp. cppnamelint utility v0.3.4INFO : Log message will print to the file (y). File = simple.cpp
|
Hi @ruedbi
Sorry to reply you late, next time you can ping me directly. And if possible could you please file issues one by one making it clear. You did nice to this project and must hard to test and compare it with clang, thank you. Issues that you have ideas to fix or improve, PR is also welcome. Another information about this project, I am still trying to migrate features to clang-tidy too, at that time this project will be archived. |
based on 96c8b87
File = 2.04.initializer.list.cpp
Config = cppnamelint.toml
Checked = 16 [File:0 | Func: 4 | Param: 4 | Var: 8 | Enum: 0 | Struct: 0 | Union: 0 | Class: 2]
Error = 2 [File:0 | Func: 2 | Param: 0 | Var: 0 | Enum: 0 | Struct: 0 | Union: 0 | Class: 0]
< 18, 5> Function : Foo
< 24, 5> Function : MagicFoo
The same applies to structs:
File = 10.2.concepts.cpp
Config = cppnamelint.toml
Checked = 35 [File:0 | Func: 13 | Param: 7 | Var: 12 | Enum: 0 | Struct: 3 | Union: 0 | Class: 1]
Error = 26 [File:0 | Func: 7 | Param: 7 | Var: 10 | Enum: 0 | Struct: 2 | Union: 0 | Class: 0]
< 30, 5> Function : Person
"Parameters" are reported without configuration that could be set, and disable reporting is also not possible (the TODO?)
Add any namespace around the code in e.g. 10.2.concepts.cpp and the errors will melt down to a few only:
File = 10.2.concepts.cpp
Config = cppnamelint.toml
Checked = 13 [File:0 | Func: 3 | Param: 3 | Var: 4 | Enum: 0 | Struct: 3 | Union: 0 | Class: 0]
Error = 9 [File:0 | Func: 2 | Param: 3 | Var: 2 | Enum: 0 | Struct: 2 | Union: 0 | Class: 0]
< 40, 16> Parameter : a (double)
< 40, 26> Parameter : b (double)
< 41, 9> Function : to_string
< 50, 9> Function : to_string
< 50, 26> Parameter : l (list)
< 52, 13> Variable : s (string)
< 62, 5> Variable : to_string (string)
baut at least "VariableName = 2" (or 3) seems to be required with UpperCamel classe name (other combinations not tested).
I could create a simple class like
class BlaBla
{
int someVar;
};
then the class gets detected as a variable
Checked = 1 [File:0 | Func: 0 | Param: 0 | Var: 1 | Enum: 0 | Struct: 0 | Union: 0 | Class: 0]
Error = 1 [File:0 | Func: 0 | Param: 0 | Var: 1 | Enum: 0 | Struct: 0 | Union: 0 | Class: 0]
< 1, 1> Variable : BlaBla (class)
the log then ends with
[2021-04-20 12:49:39.948] [] [info] Program is going to close. (iRet=1)
the real variable someVar does not even get checked
Can you reproduce that issue?
All for now, thanks a lot for your efforts!
The text was updated successfully, but these errors were encountered: