blob: af6d8f26a7382eaa60d98581f43aea86dd54f60c [file] [log] [blame]
Ankush Menat65279c22021-09-01 15:52:16 +05301name: Linters
2
3on:
4 pull_request: { }
5
6jobs:
7
8 linters:
9 name: linters
10 runs-on: ubuntu-latest
11 steps:
12 - uses: actions/checkout@v2
Ankush Menat65279c22021-09-01 15:52:16 +053013
Ankush Menat080fcb92022-06-28 13:46:12 +053014 - name: Set up Python 3.10
Ankush Menat65279c22021-09-01 15:52:16 +053015 uses: actions/setup-python@v2
16 with:
Ankush Menat080fcb92022-06-28 13:46:12 +053017 python-version: '3.10'
Ankush Menat65279c22021-09-01 15:52:16 +053018
19 - name: Install and Run Pre-commit
Chillar Anand915b3432021-09-02 16:44:59 +053020 uses: pre-commit/action@v2.0.3
Ankush Menat5ada11b2021-10-20 14:53:49 +053021
Ankush Menatcc1baae2021-10-22 21:43:50 +053022 - name: Download Semgrep rules
Ankush Menat4ad2b852021-10-22 22:38:44 +053023 run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
Ankush Menatcc1baae2021-10-22 21:43:50 +053024
Ankush Menat080fcb92022-06-28 13:46:12 +053025 - name: Download semgrep
26 run: pip install semgrep==0.97.0
27
28 - name: Run Semgrep rules
29 run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness