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