Fix #43, add linting process to CONTRIBUTING #100
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: semgrep-rules-test | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
semgrep-rules-test: | |
name: run semgrep rules tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: installation | |
run: | | |
python -m pip install --upgrade pip | |
python3 -m pip install semgrep | |
python3 -m pip install jsonschema pyyaml | |
- name: validations | |
run: semgrep --validate --config . | |
- name: tests | |
run: semgrep --test --test-ignore-todo | |
- name: metadata-tests | |
run: | | |
wget https://raw.githubusercontent.com/returntocorp/semgrep-rules/c5ad4bb0f4c7ee5b8cd47276b582e8bb57bd0a4d/.github/scripts/validate-metadata.py | |
wget https://raw.githubusercontent.com/returntocorp/semgrep-rules/develop/metadata-schema.yaml.schm | |
python ./validate-metadata.py -s ./metadata-schema.yaml.schm -f . | |
- name: rules-tests | |
run: semgrep --config="r/yaml.semgrep" --severity ERROR . |