Skip to content

Warn when using an empty argument #150714

Closed

Description

In #147215, the user called code --install-extension --force matklad.rust-analyzer.
Correct would have been to have matklad.rust-analyzer right after --install-extension

This change adds a warning when a string (or string[]) command line option is invoked without an argument.

Options that want to allow the empty argument can override the check by specifying allowEmptyValue in the option description.

Activity

  1. added a commit that references this issue on May 30, 2022
    b6a70a2
  2. added a commit that references this issue on May 30, 2022
    80d30e4
  3. added
    unreleased
    insiders-released
    and removed
    unreleased
    on May 30, 2022
  4. added
    verification-needed
    feature-request
    on May 31, 2022
  5. aeschli commented on May 31, 2022

    @aeschli
    ContributorAuthor

    To verify:
    code-insiders --install-extension should issue a warning
    code-insiders --enable-proposed-api should not issue a warning

    Desktop CLI:

    String options that require an argument:
    waitMarkerFilePath, locale, user-data-dir, extensions-dir, extensions-download-dir, builtin-extensions-dir, category, install-extension, uninstall-extension, log, prof-append-timers, prof-startup-prefix, disable-extension, sync, max-memory, folder-uri, file-uri, locate-extension, extensionDevelopmentPath, extensionDevelopmentKind, extensionTestsPath, extensionEnvironment, debugId, export-default-configuration, install-source, crash-reporter-directory, crash-reporter-id, install-builtin-extension, trace-category-filter, trace-options, logsPath, proxy-server, proxy-bypass-list, proxy-pac-url, js-flags, force-device-scale-factor, log-net-log, vmodule

    String options that allow empty argument:
    enable-proposed-api, inspect-extensions, inspect-brk-extensions, remote, inspect-ptyhost, inspect-brk-ptyhost, inspect-search, inspect-brk-search, inspect, inspect-brk

    Server CLI:

    String options that require argument:
    host, port, pick-port, socket-path, connection-token, connection-token-file, server-data-dir, telemetry-level, user-data-dir, file-watcher-polling, log, logsPath, folder, workspace, default-folder, default-workspace, github-auth, extensions-dir, extensions-download-dir, builtin-extensions-dir, install-extension, install-builtin-extension, uninstall-extension, locate-extension, category, compatibility

    String options that allow empty argument:
    (none)

  6. locked and limited conversation to collaborators on Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestinsiders-releasedverification-neededverifiedworkbench-cli

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions