Lines Matching full:startswith

1 // RUN: %check_clang_tidy -std=c++17 %s abseil-string-find-startswith %t -- \
3 // RUN: {abseil-string-find-startswith.StringLikeClasses: \
31 …ESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith instead of find() == 0 [abseil-string-find- in tests()
32 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, "a");{{$}} in tests()
35 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith in tests()
36 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, s);{{$}} in tests()
39 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests()
40 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "aaa");{{$}} in tests()
43 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests()
44 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, foo(foo(bar())));{{$}} in tests()
47 // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use absl::StartsWith in tests()
48 // CHECK-FIXES: {{^[[:space:]]*}}if (absl::StartsWith(s, "....")) { /* do something */ }{{$}} in tests()
51 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests()
52 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "a");{{$}} in tests()
55 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith in tests()
56 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s2, "a");{{$}} in tests()
59 …ESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith instead of rfind() == 0 [abseil-string-find… in tests()
60 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, "a");{{$}} in tests()
63 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith in tests()
64 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s, s);{{$}} in tests()
67 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests()
68 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "aaa");{{$}} in tests()
71 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests()
72 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, foo(foo(bar())));{{$}} in tests()
75 // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: use absl::StartsWith in tests()
76 // CHECK-FIXES: {{^[[:space:]]*}}if (absl::StartsWith(s, "....")) { /* do something */ }{{$}} in tests()
79 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests()
80 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(s, "a");{{$}} in tests()
83 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith in tests()
84 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(s2, "a");{{$}} in tests()
87 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use absl::StartsWith in tests()
88 // CHECK-FIXES: {{^[[:space:]]*}}absl::StartsWith(sv, "a");{{$}} in tests()
91 // CHECK-MESSAGES: :[[@LINE-1]]:3: warning: use !absl::StartsWith in tests()
92 // CHECK-FIXES: {{^[[:space:]]*}}!absl::StartsWith(sv, "a");{{$}} in tests()