-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
lint: add more linters for using absl:: over std:: #13043
Conversation
Signed-off-by: Michael Rebello <[email protected]>
Sorry, format check fails and run |
LGTM modulo format fix. |
Signed-off-by: Michael Rebello <[email protected]>
Thanks. Running the docker command didn't work for me but I fixed locally and pushed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add the entire (commonly used) API for variants, which unfortunately for this purpose are free functions, not members, so they all need a linter entry:
std::holds_alternative
std::get
std::monostate
std::get_if
Also, while you are in here did we ever add a linter for string_view? We need that also. |
Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: Michael Rebello <[email protected]>
Done, added additional linters / test cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Hm, looks like there are a lot of usages of |
Huh, |
Signed-off-by: Michael Rebello <[email protected]>
Sounds good, removed. |
Looks like we also have existing usages of |
@rebello95 looks like those uses are all in extensions code we don't include/compile into Envoy Mobile. Hence why they are in the codebase here but causes no trouble to Envoy Mobile. But yes, the decision was to not use std::string_view, so the linter change here to prohibit it is great, thanks! |
Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: Michael Rebello <[email protected]>
Thanks for confirming @junr03! I pushed a change to fix the violations from the main branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you!
Signed-off-by: Michael Rebello <[email protected]>
Coverage failure looks unrelated |
I think coverage on main branch is broken somehow due to recent limit changes. I will merge this and we can sort it out there. |
Thanks! |
…code * upstream/master: lint: add more linters for using absl:: over std:: (envoyproxy#13043) udpa: filesystem list collection support for inline entries. (envoyproxy#13028) filter: http: jwt: implement matching for HTTP CONNECT (envoyproxy#13064) [fuzz] split http filter logic into a fuzzing class (envoyproxy#13016) xds: allow empty delta update (envoyproxy#12699) CacheFilter: parses the allowed_vary_headers from the cache config. (envoyproxy#12928) router: extend HTTP CONNECT route matching criteria (envoyproxy#13056) docs: clarify use of Extended CONNECT for h/2 (envoyproxy#13051) build: shellcheck tools/ (envoyproxy#13007) [fuzz] Refactored Health Checker Impl Tests (envoyproxy#13017) Signed-off-by: Lihao Luo <[email protected]>
Follow up to #13040. Some of these examples are based on absl docs and C++ docs.
These linters are here to prevent additional breakages of Envoy Mobile on iOS due to usages of
std::
types/functions that are not supported on iOS 11. More discussion in #12341.Risk Level: Low
Testing: In PR
Signed-off-by: Michael Rebello [email protected]