Skip to content

rspm edit blocklist-rule#

Advanced

Command to edit an existing blocklist rule

rspm edit blocklist-rule [flags]

Examples#

  rspm edit blocklist-rule --id=[rule id] --package-name=[package name] --description=[text]
  rspm edit blocklist-rule --id=[rule id] --package-name=[package name] --version=[version]
  rspm edit blocklist-rule --id=[rule id] --package-name=[package name] --source=pypi --description=[text]
  rspm edit blocklist-rule --id=[rule id] --source=[source name] --exception=true --description=[text]
  rspm edit blocklist-rule --id=[rule id] --license-types=[comma-separated list of license types] --description=[text]

  # List blocklist rules to find their IDs for editing
  rspm list blocklist-rules

  # Create a rule that blocks the 'ggplot2' package globally
  rspm create blocklist-rule --package-name=ggplot2

  # Edit the rule to apply to the 'cran' source only, for versions <=3.3.2.
  # Note that special characters like '<' and '>' must be escaped with quotes.
  rspm edit blocklist-rule --id=1 --source=cran --version='<=3.3.2'

  # Edit the rule to allow 'ggplot2' as an exception
  rspm edit blocklist-rule --id=1 --exception=true

  # Edit the rule to remove the exception and block 'ggplot2' again
  rspm edit blocklist-rule --id=1 --exception=false

  # Edit the priority and description of the rule
  rspm edit blocklist-rule --id=1 --priority=90 --description="Block 'ggplot2' versions <=3.3.2 in the 'cran' source"

  # Edit the license or license types of the rule
  rspm edit blocklist-rule --id=1 --license=GPL --license-types=GPL-2.0-only,GPL-2.0-or-later

  # Remove the source and license criteria from the rule
  rspm edit blocklist-rule --id=1 --source="" --license=""

Options#

      --bioconductor           Block in all Bioconductor sources
      --description string     Description text. Optional.
      --exception              Allow package if any of the rules match
  -h, --help                   help for blocklist-rule
      --id uint                The rule ID. Required.
      --license string         Case-insensitive substring for matching package licenses
      --license-types string   A comma-separated list of package license types. License types are either a license identifier in the SPDX License List (non-deprecated), or "Unknown" for an unknown or missing license. Use the 'rspm list license-types' command to display available license types, or see https://spdx.org/licenses/ for a detailed list of SPDX license identifiers.
      --package-name string    The name of the package
      --priority uint          Execution priority, lower is executed earlier (default 100)
      --source string          The name of the source.
      --version string         Version string with optional operator for matching like '<1.0.0'. Valid operators include: >, >=, <, and <=
      --vulns                  Block the package if it contains any known security vulnerabilities

Options inherited from parent commands#

  -c, --config string          Path to config file
  -o, --output-format string   Specify the output format 'human' for human-readable output or 'json' for JSON-encoded output. (default "human")
  -v, --verbose                Provide additional output