-
Notifications
You must be signed in to change notification settings - Fork 294
Err on functions indented inside namespaces #235
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
Conversation
changed return in IsBlockInNameSpace function
erase other print statements for testing except original code.
The PR currently fails on the following testcase: namespace Test{
void foo() { }
} // namespace Test Note the leading whitespace. |
The only test that fails is for when the entire namespace, including the declaration, is indented. I'm not sure if we should support that usecase, but the error would also seem misleading.
I don't think we should be supporting this case. Saying "don't indent namespaces" is also not very misleading.
Hi all I can see you are aware of the problem on develop with this PR. https://github.com/cvvergara/pgrouting/actions/runs/8868982380/job/24349155971#step:4:77 The common place I see this happen is when the parameters of a function within a namespace are indented Note that if the code is wrapped with https://github.com/cvvergara/pgrouting/actions/runs/8868982380/job/24349155971#step:4:84 The filter |
I will check this out. Note that our other maintainer has been inactive, so merging the eventual fix may take some time due to the review requirement. |
This would involve refactoring state to also keep track of function parameter nesting (and ideally template argument nesting too). |
Since cpplint 2.0.0, indent inspection has been added but still contains a bug. This commit filters out the indent inspection to avoid issues caused by a bug. See cpplint/cpplint#235
Since cpplint 2.0.0, indent inspection has been added but still contains a bug. This commit filters out the indent inspection to avoid issues caused by a bug. See cpplint/cpplint#235
Hello,
As i mentioned in issue #234 , i noticed there is error in namespace indentation.
Refer to google style guide, there have to be no function indentation inside of namespace scope.
But lint couldn't catch it.
So i changed

like this, and checked it works well.

Honestly I could prove excatly why, But It would be appreciated if you could check.
Thank you