Skip to content

Commit 2d5a418

Browse files
authored
docs: document environment variables (#84)
1 parent bb502a8 commit 2d5a418

3 files changed

Lines changed: 27 additions & 0 deletions

File tree

docs/detectors/go.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,10 @@ Go detection will fallback if no Go v1.11+ is present.
3636

3737
Due to the nature of `go.sum` containing references for all dependencies, including historical, no-longer-needed dependencies; the fallback strategy can result in over detection.
3838
Executing `go mod tidy` before detection via fallback is encouraged.
39+
40+
## Environment Variables
41+
42+
If the environment variable `EnableGoCliScan` is set, to any value, the Go detector uses [`go mod graph`][1] to discover Go dependencies.
43+
If the environment variable is not present, we fall back to parsing `go.mod` and `go.sum` ourselves.
44+
45+
[1]: https://go.dev/ref/mod#go-mod-graph

docs/detectors/pip.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,8 @@ Pip detection will not run if `python` is unavailable.
3535
If no `bdist_wheel` or `bdist_egg` are available for a given component, dependencies will not be fetched.
3636

3737
If no internet connection or a component cannot be found in Pypi, said component and its dependencies will be skipped.
38+
39+
## Environment Variables
40+
41+
The environment variable `PyPiMaxCacheEntries` is used to control the size of the in-memory LRU cache that caches responses from PyPi.
42+
The default value is 128.

docs/environment-variables.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Environment Variables
2+
3+
Environment variables are sometimes used to control experimental features or advanced options
4+
5+
## `EnableGoCliScan`
6+
7+
If the environment variable `EnableGoCliScan` is set, to any value, the Go detector uses [`go mod graph`][1] to discover Go dependencies.
8+
If the environment variable is not set, we fall back to parsing `go.mod` and `go.sum` ourselves.
9+
10+
## `PyPiMaxCacheEntries`
11+
12+
The environment variable `PyPiMaxCacheEntries` is used to control the size of the in-memory LRU cache that caches responses from PyPi.
13+
The default value is 128.
14+
15+
[1]: https://go.dev/ref/mod#go-mod-graph

0 commit comments

Comments
 (0)