Skip to content

Commit

Permalink
Merge pull request #4856 from maan2003/ma/jj-vyvksyvtvrrl
Browse files Browse the repository at this point in the history
mass backport
  • Loading branch information
elsirion committed Apr 10, 2024
2 parents 8bd995e + bb306ad commit 446f967
Show file tree
Hide file tree
Showing 101 changed files with 1,695 additions and 906 deletions.
25 changes: 22 additions & 3 deletions .config/semgrep.yaml
Expand Up @@ -61,17 +61,35 @@ rules:
- id: ban-tokio-spawn
languages:
- rust
message: "`tokio::spawn` won't set task name by default. use `fedimint_core::task::spawn` instead"
message: "`tokio::spawn` won't set task name by default. use `fedimint_core::runtime::spawn` instead"
pattern: tokio::spawn
severity: WARNING

- id: ban-tokio-sleep
languages:
- rust
message: "`tokio::time::sleep` doesn't work in WASM. Use `fedimint_core::task::sleep` instead."
message: "`tokio::time::sleep` doesn't work in WASM. Use `fedimint_core::runtime::sleep` instead."
pattern: tokio::time::sleep
severity: WARNING

- id: ban-raw-block-on
languages:
- rust
message: Use `fedimint_core::runtime::block_on()` instead.
pattern-either:
- pattern: futures::executor::block_on
- pattern: tokio::runtime::Handle::block_on
- pattern: tokio::runtime::Handle::current
severity: WARNING

- id: ban-raw-block-in-place
languages:
- rust
message: Use `fedimint_core::runtime::block_in_place()` instead.
pattern-either:
- pattern: tokio::task::block_in_place
severity: WARNING

- id: ban-raw-url
languages:
- rust
Expand Down Expand Up @@ -108,6 +126,7 @@ rules:
- pattern-either:
- pattern: sleep(...)
- pattern: fedimint_core::task::sleep(...)
- pattern: fedimint_core::runtime::sleep(...)
paths:
include:
- fedimint-testing/
Expand All @@ -120,7 +139,7 @@ rules:
- gateway/ln-gateway/tests/
- fedimint-client/src/backup/tests.rs
- devimint/src/tests.rs
message: "Direct use of fedimint_core::task::sleep in tests is discouraged. Use fedimint_core::task::sleep_in_test instead."
message: "Direct use of fedimint_core::runtime::sleep in tests is discouraged. Use fedimint_core::task::sleep_in_test instead."
severity: WARNING

- id: ban-sleep-in-test-scripts
Expand Down

0 comments on commit 446f967

Please sign in to comment.