semgrep: Catch stanza:text() (assuming it's meant to be :get_text())
authorMatthew Wild <mwild1@gmail.com>
Sat, 03 Sep 2022 21:17:38 +0100
changeset 12721 898e99f49d80
parent 12720 0b68b021ce46
child 12722 27a4a7e64831
semgrep: Catch stanza:text() (assuming it's meant to be :get_text())
.semgrep.yml
--- a/.semgrep.yml	Mon Jul 11 18:48:57 2022 +0200
+++ b/.semgrep.yml	Sat Sep 03 21:17:38 2022 +0100
@@ -22,3 +22,9 @@
   message: Non-string default from :get_option_string
   severity: ERROR
   languages: [lua]
+- id: stanza-empty-text-constructor
+  patterns:
+    - pattern: $A:text()
+  message: Use :get_text() to read text, or pass a value here to add text
+  severity: WARNING
+  languages: [lua]