Repository: dotnet/roslyn
File: src/LanguageServer/Microsoft.CodeAnalysis.LanguageServer/Program.cs (C#)

Code before:
    {
        Description = "Use stdio for communication with the client.",
        Required = false,
        DefaultValueFactory = _ => false,
    };

    var autoLoadProjectsOption = new Option<bool>("--autoLoadProjects")
    {
        Description = "The server should automatically discover and load projects based on the workspace folders",
        Required = false,
        DefaultValueFactory = _ => false,
    };

    var sourceGeneratorExecutionOption = new Option<SourceGeneratorExecutionPreference>("--sourceGeneratorExecutionPreference")
    {
        Description = "Controls when source generators are executed.",
        Required = false,
        // Balanced mode requires additional client side support (to trigger refreshes), so by default run in automatic to ensure tool scenarios without client support run generators.
        DefaultValueFactory = _ => SourceGeneratorExecutionPreference.Automatic,
    };

    var parentProcessIdOption = new Option<int?>("--process-id")
    {
        Description = "The process ID of the parent process. The server will terminate when the parent process exits.",
        Required = false,
    };

    var rootCommand = new RootCommand()
    {
        debugOption,
        brokeredServicePipeNameOption,
        logLevelOption,
        starredCompletionsPathOption,
        telemetryLevelOption,
        sessionIdOption,
        extensionAssemblyPathsOption,
        devKitDependencyPathOption,
        razorSourceGeneratorOption,
        razorDesignTimePathOption,
        csharpDesignTimePathOption,
        extensionLogDirectoryOption,
        serverPipeNameOption,
        useStdIoOption,
        autoLoadProjectsOption,
        sourceGeneratorExecutionOption,
        parentProcessIdOption,
    };

    rootCommand.SetAction((parseResult, cancellationToken) =>
    {
        var launchDebugger = parseResult.GetValue(debugOption);

Review comment (suggestion):
The new option name `--process-id` is inconsistent with the existing long options in this command (which use `--camelCase`, e.g. `--sessionId`, `--logLevel`, `--autoLoadProjects`). Consider renaming to `--processId` (and optionally keeping `--process-id` as an alias for compatibility) to match the established convention in this entrypoint.

Code after:
    var serverPipeNameOption = new Option<string?>("--pipe")
    {
        Description = "The name of the pipe the server will connect to.",
        Required = false
    };

    var useStdIoOption = new Option<bool>("--stdio")
    {
        Description = "Use stdio for communication with the client.",
        Required = false,
        DefaultValueFactory = _ => false,
    };

    var autoLoadProjectsOption = new Option<bool>("--autoLoadProjects")
    {
        Description = "The server should automatically discover and load projects based on the workspace folders",
        Required = false,
        DefaultValueFactory = _ => false,
    };

    var sourceGeneratorExecutionOption = new Option<SourceGeneratorExecutionPreference>("--sourceGeneratorExecutionPreference")
    {
        Description = "Controls when source generators are executed.",
        Required = false,
        // Balanced mode requires additional client side support (to trigger refreshes), so by default run in automatic to ensure tool scenarios without client support run generators.
        DefaultValueFactory = _ => SourceGeneratorExecutionPreference.Automatic,
    };

    var clientProcessIdOption = new Option<int?>("--clientProcessId")
    {
        Description = "The process ID of the client process. The server will terminate when the client process exits.",
        Required = false,
    };

    var rootCommand = new RootCommand()
    {
        debugOption,
        brokeredServicePipeNameOption,
        logLevelOption,
        starredCompletionsPathOption,
        telemetryLevelOption,
        sessionIdOption,
        extensionAssemblyPathsOption,
        devKitDependencyPathOption,
        razorSourceGeneratorOption,
        razorDesignTimePathOption,
        csharpDesignTimePathOption,
        extensionLogDirectoryOption,
        serverPipeNameOption,
        useStdIoOption,
        autoLoadProjectsOption,