args._.forEach(arg=>assert(/^(\w:)?[^:]+(:\d*){0,2}$/.test(arg),localize('gotoValidation',"Arguments in `--goto` mode should be in the format of `FILE(:LINE(:CHARACTER))`.")));
}
if(args['max-memory']){
assert(args['max-memory']>=MIN_MAX_MEMORY_SIZE_MB,`The max-memory argument cannot be specified lower than ${MIN_MAX_MEMORY_SIZE_MB} MB.`);
{id:'diff',type:'boolean',cat:'o',alias:'d',args:['file','file'],description:localize('diff',"Compare two files with each other.")},
{id:'add',type:'boolean',cat:'o',alias:'a',args:'folder',description:localize('add',"Add folder(s) to the last active window.")},
{id:'goto',type:'boolean',cat:'o',alias:'g',args:'file:line[:character]',description:localize('goto',"Open a file at the path on the specified line and character position.")},
{id:'new-window',type:'boolean',cat:'o',alias:'n',description:localize('newWindow',"Force to open a new window.")},
{id:'reuse-window',type:'boolean',cat:'o',alias:'r',description:localize('reuseWindow',"Force to open a file or folder in an already opened window.")},
{id:'wait',type:'boolean',cat:'o',alias:'w',description:localize('wait',"Wait for the files to be closed before returning.")},
{id:'locale',type:'string',cat:'o',args:'locale',description:localize('locale',"The locale to use (e.g. en-US or zh-TW).")},
{id:'user-data-dir',type:'string',cat:'o',args:'dir',description:localize('userDataDir',"Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code.")},
{id:'folder-uri',type:'string',cat:'o',args:'uri',description:localize('folderUri',"Opens a window with given folder uri(s)")},
{id:'file-uri',type:'string',cat:'o',args:'uri',description:localize('fileUri',"Opens a window with given file uri(s)")},
{id:'extensions-dir',type:'string',cat:'e',args:'dir',description:localize('extensionHomePath',"Set the root path for extensions.")},
{id:'list-extensions',type:'boolean',cat:'e',description:localize('listExtensions',"List the installed extensions.")},
{id:'show-versions',type:'boolean',cat:'e',description:localize('showVersions',"Show versions of installed extensions, when using --list-extension.")},
{id:'install-extension',type:'string',cat:'e',args:'extension-id',description:localize('installExtension',"Installs or updates the extension. Use `--force` argument to avoid prompts.")},
{id:'uninstall-extension',type:'string',cat:'e',args:'extension-id',description:localize('uninstallExtension',"Uninstalls an extension.")},
{id:'enable-proposed-api',type:'string',cat:'e',args:'extension-id',description:localize('experimentalApis',"Enables proposed API features for extensions. Can receive one or more extension IDs to enable individually.")},
{id:'log',type:'string',cat:'t',args:'level',description:localize('log',"Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'.")},
{id:'status',type:'boolean',alias:'s',cat:'t',description:localize('status',"Print process usage and diagnostics information.")},
{id:'prof-modules',type:'boolean',alias:'p',cat:'t',description:localize('prof-modules',"Capture performance markers while loading JS modules and print them with 'F1 > Developer: Startup Performance")},
{id:'prof-startup',type:'boolean',cat:'t',description:localize('prof-startup',"Run CPU profiler during startup")},
{id:'disable-extensions',type:'boolean',cat:'t',description:localize('disableExtensions',"Disable all installed extensions.")},
{id:'disable-extension',type:'string',cat:'t',args:'extension-id',description:localize('disableExtension',"Disable an extension.")},
{id:'inspect-extensions',type:'string',args:'port',cat:'t',description:localize('inspect-extensions',"Allow debugging and profiling of extensions. Check the developer tools for the connection URI.")},
{id:'inspect-brk-search',type:'string',args:'port',cat:'t',description:localize('inspect-brk-extensions',"Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection URI.")},
'-d, --diff <file> <file>':localize('diff',"Compare two files with each other."),
'-a, --add <dir>':localize('add',"Add folder(s) to the last active window."),
'-g, --goto <file:line[:character]>':localize('goto',"Open a file at the path on the specified line and character position."),
'-n, --new-window':localize('newWindow',"Force to open a new window."),
'-r, --reuse-window':localize('reuseWindow',"Force to open a file or folder in an already opened window."),
'-w, --wait':localize('wait',"Wait for the files to be closed before returning."),
'--locale <locale>':localize('locale',"The locale to use (e.g. en-US or zh-TW)."),
'--user-data-dir <dir>':localize('userDataDir',"Specifies the directory that user data is kept in. Can be used to open multiple distinct instances of Code."),
'--extensions-dir <dir>':localize('extensionHomePath',"Set the root path for extensions."),
'--list-extensions':localize('listExtensions',"List the installed extensions."),
'--show-versions':localize('showVersions',"Show versions of installed extensions, when using --list-extension."),
'--uninstall-extension (<extension-id> | <extension-vsix-path>)':localize('uninstallExtension',"Uninstalls an extension."),
'--install-extension (<extension-id> | <extension-vsix-path>)':localize('installExtension',"Installs or updates the extension. Use `--force` argument to avoid prompts."),
'--enable-proposed-api (<extension-id>)':localize('experimentalApis',"Enables proposed API features for extensions. Can receive one or more extension IDs to enable individually.")
'--log <level>':localize('log',"Log level to use. Default is 'info'. Allowed values are 'critical', 'error', 'warn', 'info', 'debug', 'trace', 'off'."),
'-s, --status':localize('status',"Print process usage and diagnostics information."),
'--prof-startup':localize('prof-startup',"Run CPU profilers during startup."),
'--prof-modules':localize('prof-modules',"Capture performance markers while loading JS modules and print them with 'F1 > Developer: Startup Performance'"),
'--disable-extensions':localize('disableExtensions',"Disable all installed extensions."),
'--disable-extension <extension-id>':localize('disableExtension',"Disable an extension."),
'--inspect-extensions':localize('inspect-extensions',"Allow debugging and profiling of extensions. Check the developer tools for the connection URI."),
'--inspect-brk-extensions':localize('inspect-brk-extensions',"Allow debugging and profiling of extensions with the extension host being paused after start. Check the developer tools for the connection URI."),
args._.forEach(arg=>assert(/^(\w:)?[^:]+(:\d*){0,2}$/.test(arg),localize('gotoValidation',"Arguments in `--goto` mode should be in the format of `FILE(:LINE(:CHARACTER))`.")));
}
if(args['max-memory']){
assert(args['max-memory']>=MIN_MAX_MEMORY_SIZE_MB,`The max-memory argument cannot be specified lower than ${MIN_MAX_MEMORY_SIZE_MB} MB.`);