From 2f584b5677115a84160d0a588f93d88fd903428f Mon Sep 17 00:00:00 2001 From: wafula Date: Wed, 1 Apr 2026 19:31:44 +0300 Subject: [PATCH] chore(ci): add linters GitHub Actions workflow with pre-commit and Semgrep --- .github/workflows/linters.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/linters.yml diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 00000000..da33ae0f --- /dev/null +++ b/.github/workflows/linters.yml @@ -0,0 +1,34 @@ +name: Linters + +on: + pull_request: {} + +jobs: + linters: + name: linters + runs-on: ubuntu-latest + if: github.event_name == 'pull_request' + + steps: + - uses: actions/checkout@v6 + + - name: Set up Python 3.14 + uses: actions/setup-python@v6 + with: + python-version: '3.14' + + - name: Install and Run Pre-commit + uses: pre-commit/action@v3.0.1 + + - name: Download Semgrep rules + run: + git clone --depth 1 https://github.com/frappe/semgrep-rules.git + frappe-semgrep-rules + + - name: Download semgrep + run: pip install semgrep + + - name: Run Semgrep rules + run: + semgrep ci --config ./frappe-semgrep-rules/rules --config + r/python.lang.correctness