seitime-frappe/.github/workflows/semgrep.yml
Ankush Menat d7bc848a52
test(semgrep): python and javascript translation
- Move rules to .github folder to reduce clutter in root folder
- separate out rules
- add tests for rules
- docs for writing more rules
2021-03-13 18:22:48 +05:30

22 lines
607 B
YAML

name: Semgrep
on:
pull_request:
branches:
- develop
jobs:
semgrep:
name: Frappe Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup python3
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Run semgrep
run: |
python -m pip install -q semgrep
git fetch origin $GITHUB_BASE_REF:$GITHUB_BASE_REF -q
files=$(git diff --name-only --diff-filter=d $GITHUB_BASE_REF)
[[ -d .github/helper/semgrep_rules ]] && semgrep --config=.github/helper/semgrep_rules --quiet --error $files