forked from ray-project/ray
-
Notifications
You must be signed in to change notification settings - Fork 1
/
semgrep.yml
43 lines (42 loc) · 1.92 KB
/
semgrep.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
rules:
- id: code-block-python
paths:
include:
# Ray Core
- "python/ray/util/**/*.py"
- "python/ray/_private/**/*.py"
- "python/ray/core/**/*.py"
- "doc/source/ray-core/**/*.rst"
- "doc/source/ray-overview/**/*.rst"
- "doc/source/ray-observability/**/*.rst"
# Ray Data
- "python/ray/data/**/*.py"
- "doc/source/data/**/*.rst"
# Ray Train
- "python/ray/train/**/*.py"
- "doc/source/train/**/*.rst"
exclude:
# FIXME(@matthewdeng): We're ignoring the examples for now since they'll likely
# get re-written.
- "doc/source/train/examples/pytorch/torch_data_prefetch_benchmark/benchmark_example.rst"
- "doc/source/train/dl_guide.rst"
# FIXME(@ml-team): These are byproduct from train doc rewritten. Will fix them as a team.
- "doc/source/train/overview.rst"
- "doc/source/train/getting-started-pytorch-lightning.rst"
- "doc/source/train/getting-started-pytorch.rst"
- "doc/source/train/getting-started-transformers.rst"
- "doc/source/train/user-guides/checkpoints.rst"
- "doc/source/train/user-guides/data-loading-preprocessing.rst"
- "doc/source/train/user-guides/experiment-tracking.rst"
- "doc/source/train/user-guides/monitoring-logging.rst"
- "doc/source/train/user-guides/persistent-storage.rst"
- "doc/source/train/user-guides/using-gpus.rst"
- "doc/source/train/distributed-tensorflow-keras.rst"
- "doc/source/train/horovod.rst"
- "doc/source/train/deepspeed.rst"
- "doc/source/train/huggingface-accelerate.rst"
languages:
- generic
message: "Don't use 'code-block:: python', it's not tested! Use 'testcode' instead! For more information, see https://docs.ray.io/en/master/ray-contribute/writing-code-snippets.html."
pattern: "code-block:: python"
severity: ERROR