* ci(semgrep): add more rules, r/python.correctness - Added file for defining rules as per frappe data model: frappe_correctness.yml - Add rule for SQLi, with WARNING only for now - Add rule file for UX - WARNING | INFO do not fail the build now * ci(semgrep): on_cancel, on_submit correctness rule * ci(semgrep): split workflow in steps * ci(semgrep): catch line breaks in _() * chore: fix sider issue
15 lines
632 B
YAML
15 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
|