From 4a5bb2873dc900f7c4394f6cb5ecf6d5170cfb18 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Tue, 19 Oct 2021 13:25:37 +0530 Subject: [PATCH] ci: Ignore sql=>qb rule for test files --- .github/helper/semgrep_rules/frappe_correctness.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/helper/semgrep_rules/frappe_correctness.yml b/.github/helper/semgrep_rules/frappe_correctness.yml index 1297d7fa67..33a22fba6a 100644 --- a/.github/helper/semgrep_rules/frappe_correctness.yml +++ b/.github/helper/semgrep_rules/frappe_correctness.yml @@ -137,6 +137,9 @@ rules: - pattern: frappe.db.sql(...) - pattern: frappe.db.sql_ddl(...) - pattern: frappe.db.sql_list(...) + paths: + exclude: + - "test_*.py" message: | The PR contains a SQL query that may be re-written with frappe.qb (https://frappeframework.com/docs/user/en/api/query-builder) or the Database API (https://frappeframework.com/docs/user/en/api/database) languages: [python]