@fsvreddit/bot-bouncer-evaluation 0.7.46 → 0.7.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,9 +68,16 @@ class EvaluateBadDisplayNameDefinedHandles extends UserEvaluatorBase_js_1.UserEv
68
68
  continue;
69
69
  }
70
70
  }
71
- if (this.getHandles().some(handle => handle === "")) {
71
+ const handles = this.getHandles();
72
+ if (handles.some(handle => handle === "")) {
72
73
  results.push({ severity: "error", message: `Empty handle found in baddisplaynamedefinedhandles` });
73
74
  }
75
+ else {
76
+ const shortHandles = handles.filter(handle => handle.length < 4);
77
+ if (shortHandles.length > 0) {
78
+ results.push({ severity: "error", message: `Handle too short in baddisplaynamedefinedhandles: ${shortHandles.join(", ")}` });
79
+ }
80
+ }
74
81
  return results;
75
82
  }
76
83
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -56,6 +56,12 @@ class EvaluateBioTextDefinedHandles extends UserEvaluatorBase_js_1.UserEvaluator
56
56
  if (handles.some(handle => handle === "")) {
57
57
  results.push({ severity: "error", message: `Empty handle found in biotextdefinedhandles` });
58
58
  }
59
+ else {
60
+ const shortHandles = handles.filter(handle => handle.length < 4);
61
+ if (shortHandles.length > 0) {
62
+ results.push({ severity: "error", message: `Handle too short in biotextdefinedhandles: ${shortHandles.join(", ")}` });
63
+ }
64
+ }
59
65
  return results;
60
66
  }
61
67
  gatherRegexes() {
@@ -51,6 +51,12 @@ class EvaluatePostTitleDefinedHandles extends UserEvaluatorBase_js_1.UserEvaluat
51
51
  if (handles.some(handle => handle === "")) {
52
52
  results.push({ severity: "error", message: `Empty handle found in posttitledefinedhandles` });
53
53
  }
54
+ else {
55
+ const shortHandles = handles.filter(handle => handle.length < 4);
56
+ if (shortHandles.length > 0) {
57
+ results.push({ severity: "error", message: `Handle too short in posttitledefinedhandles: ${shortHandles.join(", ")}` });
58
+ }
59
+ }
54
60
  return results;
55
61
  }
56
62
  gatherRegexes() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fsvreddit/bot-bouncer-evaluation",
3
- "version": "0.7.46",
3
+ "version": "0.7.47",
4
4
  "description": "Evaluation code for Bot Bouncer, a Dev Platform app designed to hunt bots on Reddit",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {