From a93b02a230c42ba8b2505191b37dd19a990307a2 Mon Sep 17 00:00:00 2001 From: Michael Rebello Date: Thu, 10 Sep 2020 13:03:39 -0700 Subject: [PATCH] remove std::get linter Signed-off-by: Michael Rebello --- tools/code_format/check_format.py | 2 -- tools/code_format/check_format_test_helper.py | 1 - tools/testdata/.DS_Store | Bin 0 -> 6148 bytes tools/testdata/check_format/std_get.cc | 8 -------- 4 files changed, 11 deletions(-) create mode 100644 tools/testdata/.DS_Store delete mode 100644 tools/testdata/check_format/std_get.cc diff --git a/tools/code_format/check_format.py b/tools/code_format/check_format.py index 20345e43d953..c9f96418bb06 100755 --- a/tools/code_format/check_format.py +++ b/tools/code_format/check_format.py @@ -692,8 +692,6 @@ def checkSourceLine(line, file_path, reportError): # See: https://github.com/envoyproxy/envoy/issues/12341 if tokenInLine("std::any", line): reportError("Don't use std::any; use absl::any instead") - if tokenInLine("std::get", line): - reportError("Don't use std::get; use absl::get instead") if tokenInLine("std::get_if", line): reportError("Don't use std::get_if; use absl::get_if instead") if tokenInLine("std::holds_alternative", line): diff --git a/tools/code_format/check_format_test_helper.py b/tools/code_format/check_format_test_helper.py index d9c7818d8447..bb08f6518cb7 100755 --- a/tools/code_format/check_format_test_helper.py +++ b/tools/code_format/check_format_test_helper.py @@ -243,7 +243,6 @@ def runChecks(): "std_unordered_set.cc", "Don't use std::unordered_set; use absl::flat_hash_set instead " + "or absl::node_hash_set if pointer stability of keys/values is required") errors += checkUnfixableError("std_any.cc", "Don't use std::any; use absl::any instead") - errors += checkUnfixableError("std_get.cc", "Don't use std::get; use absl::get instead") errors += checkUnfixableError("std_get_if.cc", "Don't use std::get_if; use absl::get_if instead") errors += checkUnfixableError("std_holds_alternative.cc", "Don't use std::holds_alternative; use absl::holds_alternative instead") diff --git a/tools/testdata/.DS_Store b/tools/testdata/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..f24b79727921904acb5ed139618f070548ebb60f GIT binary patch literal 6148 zcmeHK%}(1u5S|Tbu?a%1#DPj2R^q^gL--Nt(F)L0r6P>r0Bvg5F0pF7$Z^Oaie&Ks zeSr2_=zEktL|>%$&g^awDCLTxYDSv<#KiLMWp_?;^@ngfV}ji!AMx&E{`W zo2fs0KI^!14Y#q-aNh-8H3-VE?DyJX(eajpG)|(hI8NiTdzj>VS#p`=Z;Ll!nG`1! ze5h200mcraqcj&*Pqsx5c%+AC_IL9pL~1F05kCP4AA}{Q3-vEl|j9A z;6T5RG+!qqL7UDJgwmpKu`-A=D8i&7np9zr7{a8ZU)ng|Vr9^zgU~Bu9lNryClsMq zN59nJAbf*7G6T%OLk4EdrAPgL@A32h!z8|92AF~WiUCpI4R+i3NVd05JRJ2}iTVMR pgyJfLcPVJ-R*bRKikDEepkI=K=v%A|q6dY41T+miFauA@z+V_lWjp`? literal 0 HcmV?d00001 diff --git a/tools/testdata/check_format/std_get.cc b/tools/testdata/check_format/std_get.cc deleted file mode 100644 index ba56dfcdcb7f..000000000000 --- a/tools/testdata/check_format/std_get.cc +++ /dev/null @@ -1,8 +0,0 @@ -#include - -namespace Envoy { - void foo() { - absl::variant x(5); - auto y = std::get(x); - } -} // namespace Envoy