Skip to content

Commit

Permalink
maint: move semgrep folder again
Browse files Browse the repository at this point in the history
Moves the semgrep folder back into .semgrep now that we worked out
how to actually execute the tests when they're located inside of
a hidden folder.
  • Loading branch information
smartcontracts committed Nov 5, 2024
1 parent 4fa3ede commit 1aa740a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,10 @@ workflows:
- contracts-bedrock-build
- semgrep-scan:
name: semgrep-scan-local
scan_command: semgrep scan --timeout=100 --config=./semgrep --error .
scan_command: semgrep scan --timeout=100 --config .semgrep/rules/ --error .
- semgrep-scan:
name: semgrep-test
scan_command: semgrep scan --test semgrep/
scan_command: semgrep scan --test --config .semgrep/rules/ .semgrep/tests/
- go-lint
- fuzz-golang:
name: fuzz-golang-<<matrix.package_name>>
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .semgrepignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vendor/
*.min.js

# Semgrep rules folder
semgrep/
.semgrep/

# Semgrep-action log folder
.semgrep_logs/
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ issues:

# Runs semgrep on the entire monorepo.
semgrep:
semgrep scan --config=semgrep --error .
semgrep scan --config .semgrep/rules/ --error .

# Runs semgrep tests.
semgrep-test:
semgrep scan --test semgrep/
semgrep scan --test --config .semgrep/rules/ .semgrep/tests/

lint-shellcheck:
find . -type f -name '*.sh' -not -path '*/node_modules/*' -not -path './packages/contracts-bedrock/lib/*' -not -path './packages/contracts-bedrock/kout*/*' -exec sh -c 'echo \"Checking $1\"; shellcheck \"$1\"' _ {} \\;
Expand Down
6 changes: 3 additions & 3 deletions packages/contracts-bedrock/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ semver-diff-check: build semver-diff-check-no-build

# Checks that the semgrep tests are valid.
semgrep-test-validity-check:
forge fmt ../../semgrep/sol-rules.t.sol --check
forge fmt ../../.semgrep/tests/sol-rules.t.sol --check

# Checks that forge test names are correctly formatted.
lint-forge-tests-check:
Expand Down Expand Up @@ -199,11 +199,11 @@ check-kontrol-summaries-unchanged:

# Runs semgrep on the contracts.
semgrep:
cd ../../ && semgrep scan --config=semgrep ./packages/contracts-bedrock
cd ../../ && semgrep scan --config .semgrep/rules/ ./packages/contracts-bedrock

# Runs semgrep tests.
semgrep-test:
cd ../../ && semgrep scan --test semgrep
cd ../../ && semgrep scan --test --config .semgrep/rules/ .semgrep/tests/

# TODO: Also run lint-forge-tests-check but we need to fix the test names first.
# Runs all checks.
Expand Down

0 comments on commit 1aa740a

Please sign in to comment.