Skip to content

Commit

Permalink
fix: Hide --workers CLI option and configuration file key (#327)
Browse files Browse the repository at this point in the history
* fix: Hide --workers CLI option and configuration file key

The `--workers` option is currently not being respected. Pending
a resolution, we hide the CLI option and associated entry in the
configuration file.

Closes #317

* Update docs

Using `go run ./scripts/gen-doc-yaml.go`
  • Loading branch information
spdawson authored Jan 5, 2023
1 parent 4eacf08 commit 4b6a260
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/_data/curio_scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ options:
- name: files-to-batch
default_value: "1"
usage: Specify the number of files to batch per worker.
- name: force
default_value: "false"
usage: Disable the cache and runs the detections again
- name: format
shorthand: f
usage: Specify report format (json, yaml)
Expand Down Expand Up @@ -80,9 +83,6 @@ options:
- name: timeout-worker-online
default_value: 1m0s
usage: Maximum time to wait for a worker process to come online.
- name: workers
default_value: "1"
usage: The number of processing workers to spawn.
example: |4-
# Scan a local project, including language-specific files
$ curio scan /path/to/your_project
Expand Down
1 change: 0 additions & 1 deletion integration/flags/.snapshots/TestInitCommand
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ worker:
timeout-file-min: 5s
timeout-file-second-per-bytes: 10000
timeout-worker-online: 1m0s
workers: 1

1 change: 0 additions & 1 deletion integration/flags/.snapshots/TestMetadataFlags-help-scan
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Worker Flags
--timeout-file-min duration Minimum timeout assigned for scanning each file. This config superseeds timeout-second-per-bytes. (default 5s)
--timeout-file-second-per-bytes int number of file size bytes producing a second of timeout assigned to scanning a file (default 10000)
--timeout-worker-online duration Maximum time to wait for a worker process to come online. (default 1m0s)
--workers int The number of processing workers to spawn. (default 1)


--
Expand Down
1 change: 0 additions & 1 deletion integration/flags/.snapshots/TestMetadataFlags-scan-help
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Worker Flags
--timeout-file-min duration Minimum timeout assigned for scanning each file. This config superseeds timeout-second-per-bytes. (default 5s)
--timeout-file-second-per-bytes int number of file size bytes producing a second of timeout assigned to scanning a file (default 10000)
--timeout-worker-online duration Maximum time to wait for a worker process to come online. (default 1m0s)
--workers int The number of processing workers to spawn. (default 1)


--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Worker Flags
--timeout-file-min duration Minimum timeout assigned for scanning each file. This config superseeds timeout-second-per-bytes. (default 5s)
--timeout-file-second-per-bytes int number of file size bytes producing a second of timeout assigned to scanning a file (default 10000)
--timeout-worker-online duration Maximum time to wait for a worker process to come online. (default 1m0s)
--workers int The number of processing workers to spawn. (default 1)


flag error: report flags error: invalid format argument; supported values: json, yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Worker Flags
--timeout-file-min duration Minimum timeout assigned for scanning each file. This config superseeds timeout-second-per-bytes. (default 5s)
--timeout-file-second-per-bytes int number of file size bytes producing a second of timeout assigned to scanning a file (default 10000)
--timeout-worker-online duration Maximum time to wait for a worker process to come online. (default 1m0s)
--workers int The number of processing workers to spawn. (default 1)


flag error: report flags error: invalid format argument; supported values: json, yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ Worker Flags
--timeout-file-min duration Minimum timeout assigned for scanning each file. This config superseeds timeout-second-per-bytes. (default 5s)
--timeout-file-second-per-bytes int number of file size bytes producing a second of timeout assigned to scanning a file (default 10000)
--timeout-worker-online duration Maximum time to wait for a worker process to come online. (default 1m0s)
--workers int The number of processing workers to spawn. (default 1)


flag error: report flags error: invalid report argument; supported values: detectors, dataflow, policies, stats
Expand Down
2 changes: 1 addition & 1 deletion pkg/flag/worker_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (

var (
WorkersFlag = Flag{
Name: "workers",
ConfigName: "worker.workers",
Value: 1,
Usage: "The number of processing workers to spawn.",
DisableInConfig: true,
}
TimeoutFlag = Flag{
Name: "timeout",
Expand Down

0 comments on commit 4b6a260

Please sign in to comment.