MCPcopy Index your code
hub / github.com/OperationT00/T-Code / shouldSkip

Method shouldSkip

src/main/java/com/tcode/cli/TCodeHistory.java:24–40  ·  view source on GitHub ↗
(String line)

Source from the content-addressed store, hash-verified

22 }
23
24 static boolean shouldSkip(String line) {
25 if (line == null) {
26 return true;
27 }
28 String trimmed = line.trim();
29 if (trimmed.isEmpty() || trimmed.length() > MAX_HISTORY_LINE_LENGTH) {
30 return true;
31 }
32 if (SECRET_ASSIGNMENT.matcher(trimmed).matches() || BASE64_IMAGE.matcher(trimmed).matches()) {
33 return true;
34 }
35 String lower = trimmed.toLowerCase(Locale.ROOT);
36 return lower.contains("bearer ")
37 || lower.contains("authorization:")
38 || lower.contains("-----begin ")
39 || lower.contains("private key");
40 }
41}

Callers 1

addMethod · 0.95

Calls 3

containsMethod · 0.80
isEmptyMethod · 0.45
matchesMethod · 0.45

Tested by

no test coverage detected