Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 1 | name: Linters |
2 | |||||
3 | on: | ||||
4 | pull_request: { } | ||||
5 | |||||
6 | jobs: | ||||
7 | |||||
8 | linters: | ||||
9 | name: linters | ||||
10 | runs-on: ubuntu-latest | ||||
11 | steps: | ||||
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 12 | - uses: actions/checkout@v3 |
Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 13 | |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 14 | - name: Set up Python 3.10 |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 15 | uses: actions/setup-python@v4 |
Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 16 | with: |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 17 | python-version: '3.10' |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 18 | cache: pip |
Ankush Menat | 65279c2 | 2021-09-01 15:52:16 +0530 | [diff] [blame] | 19 | |
20 | - name: Install and Run Pre-commit | ||||
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 21 | uses: pre-commit/action@v3.0.0 |
Ankush Menat | 5ada11b | 2021-10-20 14:53:49 +0530 | [diff] [blame] | 22 | |
Ankush Menat | cc1baae | 2021-10-22 21:43:50 +0530 | [diff] [blame] | 23 | - name: Download Semgrep rules |
Ankush Menat | 4ad2b85 | 2021-10-22 22:38:44 +0530 | [diff] [blame] | 24 | run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules |
Ankush Menat | cc1baae | 2021-10-22 21:43:50 +0530 | [diff] [blame] | 25 | |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 26 | - name: Download semgrep |
Deepesh Garg | 924cdef | 2023-07-14 18:53:02 +0530 | [diff] [blame] | 27 | run: pip install semgrep |
Ankush Menat | 080fcb9 | 2022-06-28 13:46:12 +0530 | [diff] [blame] | 28 | |
29 | - name: Run Semgrep rules | ||||
30 | run: semgrep ci --config ./frappe-semgrep-rules/rules --config r/python.lang.correctness |