Skip to content

Commit

Permalink
remove fingerprints/fingerprints.yaml (#3474)
Browse files Browse the repository at this point in the history
* remove fingerprints/fingerprints.yaml

No idea what this file is, but it's annoying because
we have to skip it in many scripts because it does not
contain regular rules and target test files.
Let's just remove it to simplify things.

test plan:
wait for green CI checks

* remove every use of fingerprints (each time it was to skip the dir)
  • Loading branch information
aryx committed Sep 19, 2024
1 parent be389ac commit 46fc340
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 835 deletions.
1 change: 0 additions & 1 deletion .codemapignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
!libsonnet/
!scripts/
!stats/
# restore also fingerprints/ ? trusted_python/ ?

# do not skip the rules
![a-z]*/**/*.yaml
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/semgrep-rule-lints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ jobs:
--exclude *.test.yaml \
--exclude contrib/ \
--exclude stats/ \
--exclude fingerprints/ \
--exclude yaml/semgrep/
2 changes: 1 addition & 1 deletion .github/workflows/semgrep-rules-test-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
path: semgrep-rules
- name: delete directories not containing rules
run: rm -rf semgrep-rules/stats semgrep-rules/fingerprints
run: rm -rf semgrep-rules/stats
#TODO: in theory we could run those tests by using --test --pro
# since our docker image now contains semgrep-core-pro (but
# it would require to be logged in though via a SEMGREP_APP_TOKEN)
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/semgrep-rules-test-historical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ jobs:
run: pip3 install semgrep
- name: delete stats directory
run: rm -rf semgrep-rules/stats
- name: delete fingerprints directory
run: rm -rf semgrep-rules/fingerprints
- name: delete rules requiring Semgrep Pro
run: rm -rf semgrep-rules/apex semgrep-rules/elixir
# TODO: remove this in the future, there was a regression in semgrep that
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/semgrep-rules-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ jobs:
run: pip3 install semgrep
- name: remove stats directory
run: rm -rf stats
- name: remove fingerprints from testing
run: rm -rf fingerprints
- name: remove rules requiring Semgrep Pro
run: rm -rf apex elixir
- name: validate rules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
env:
HEAD_REF: ${{ github.head_ref }}
run: |
CHANGED_FILES=$(git diff --name-only origin/develop origin/$HEAD_REF | xargs -0 | sed '/^$/d' | sed -r '/^(.github|bash|contrib|fingerprints|generic|json|problem-based-packs|scripts|stats|trusted_python|yaml)/d' | sed -n '/.*yaml/p' | tr '\n' ' ')
CHANGED_FILES=$(git diff --name-only origin/develop origin/$HEAD_REF | xargs -0 | sed '/^$/d' | sed -r '/^(.github|bash|generic|json|problem-based-packs|scripts|stats|trusted_python|yaml)/d' | sed -n '/.*yaml/p' | tr '\n' ' ')
echo "changed_files=$CHANGED_FILES" >> $GITHUB_ENV
- id: print-changed-files
name: debugging step - print changed files
Expand Down
Loading

0 comments on commit 46fc340

Please sign in to comment.