mirror of
https://github.com/bjc/prosody.git
synced 2025-03-31 11:47:40 +03:00
.semgrep.yml: Identify unprefixed module imports
This commit is contained in:
parent
e49c199077
commit
a9bc4a09e4
1 changed files with 9 additions and 0 deletions
|
@ -28,3 +28,12 @@ rules:
|
|||
message: Use :get_text() to read text, or pass a value here to add text
|
||||
severity: WARNING
|
||||
languages: [lua]
|
||||
- id: require-unprefixed-module
|
||||
patterns:
|
||||
- pattern: require("$X")
|
||||
- metavariable-regex:
|
||||
metavariable: $X
|
||||
regex: '^(core|net|util)\.'
|
||||
message: Prefix required module path with 'prosody.'
|
||||
severity: ERROR
|
||||
languages: [lua]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue