Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# When updating this file, please also update the linter_workflow_template in frappe/utils/boilerplate.py
name: Linters

on:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: commitcheck-frappe-${{ github.event_name }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
linter:
name: 'Semgrep Rules'
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: pip

- name: Download Semgrep rules
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules

- name: Run Semgrep rules
run: |
pip install semgrep
semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness