67e647232c
Adds semgrep testing in CI. Refer to: - https://github.com/frappe/frappe/pull/12524 - https://github.com/frappe/frappe/pull/12577
16 lines
632 B
YAML
16 lines
632 B
YAML
rules:
|
|
- id: frappe-missing-translate-function
|
|
pattern-either:
|
|
- patterns:
|
|
- pattern: frappe.msgprint("...", ...)
|
|
- pattern-not: frappe.msgprint(_("..."), ...)
|
|
- pattern-not: frappe.msgprint(__("..."), ...)
|
|
- patterns:
|
|
- pattern: frappe.throw("...", ...)
|
|
- pattern-not: frappe.throw(_("..."), ...)
|
|
- pattern-not: frappe.throw(__("..."), ...)
|
|
message: |
|
|
All user facing text must be wrapped in translate function. Please refer to translation documentation. https://frappeframework.com/docs/user/en/guides/basics/translations
|
|
languages: [python, javascript, json]
|
|
severity: ERROR
|