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

bugfix: check_format script, tokenInLine helper function #12441

Merged
merged 4 commits into from
Aug 4, 2020

Conversation

stedsome
Copy link
Contributor

@stedsome stedsome commented Aug 3, 2020

Signed-off-by: Yifan Yang needyyang@google.com
This looks like a bug to me. @sunjayBhatia do you mind confirming this?
The effect of this is that this function incorrectly returns false when the token in question is the first one in a line.

This was found during my attempt here #12421.
Commit Message:
Additional Description:
Risk Level: low, should correct an incorrect behavior.
Testing: All existing tests have passed
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

Signed-off-by: Yifan Yang <needyyang@google.com>
@sunjayBhatia
Copy link
Member

@stedsome can you add a test to the code format checker that demonstrates this issue?

@stedsome
Copy link
Contributor Author

stedsome commented Aug 3, 2020

@sunjayBhatia
If you checkout the current master, where new restrictions on std::any/optional/variant are enforced, the following testcase will not be able to report the violation.

#include <any>

namespace Envoy {
std::any foo;
} // namespace Envoy

Copy link
Member

@dio dio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting for adding a comment.

tools/code_format/check_format.py Show resolved Hide resolved
Signed-off-by: Yifan Yang <needyyang@google.com>
sunjayBhatia
sunjayBhatia previously approved these changes Aug 4, 2020
Copy link
Member

@sunjayBhatia sunjayBhatia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: Yifan Yang <needyyang@google.com>
@mattklein123 mattklein123 merged commit 598e76a into envoyproxy:master Aug 4, 2020
chaoqin-li1123 pushed a commit to chaoqin-li1123/envoy that referenced this pull request Aug 7, 2020
chaoqin-li1123 pushed a commit to chaoqin-li1123/envoy that referenced this pull request Aug 7, 2020
…12441)

Signed-off-by: Yifan Yang <needyyang@google.com>
Signed-off-by: chaoqinli <chaoqinli@google.com>
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

Successfully merging this pull request may close these issues.

4 participants