Repository: apache/kafka
File: tools/src/main/java/org/apache/kafka/tools/VerifiableConsumer.java (Java)

Code before:
                .dest("resetPolicy")
                .help("Set reset policy (must be either 'earliest', 'latest', or 'none'");

        parser.addArgument("--assignment-strategy")
                .action(store())
                .required(false)
                .setDefault(RangeAssignor.class.getName())
                .type(String.class)
                .dest("assignmentStrategy")
                .help(String.format("Set assignment strategy (e.g. %s); only used if the group protocol is %s", RoundRobinAssignor.class.getName(), GroupProtocol.CLASSIC.name()));

        parser.addArgument("--consumer.config")
                .action(store())
                .required(false)
                .type(String.class)
                .metavar("CONFIG-FILE")
                .help("(DEPRECATED) Consumer config properties file (config options shared with command line parameters will be overridden)." +
                        "This option will be removed in a future version. Use --command-config instead.");

        parser.addArgument("--command-config")
                .action(store())
                .required(false)
                .type(String.class)
                .metavar("CONFIG-FILE")
                .dest("commandConfigFile")
                .help("Config properties file.");

        return parser;
    }

    public static VerifiableConsumer createFromArgs(ArgumentParser parser, String[] args) throws ArgumentParserException {
        Namespace res = parser.parseArgs(args);

        boolean useAutoCommit = res.getBoolean("useAutoCommit");
        String configFile = res.getString("consumer.config");
        String commandConfigFile = res.getString("commandConfigFile");
        String brokerHostAndPort = res.getString("bootstrapServer");

        Properties consumerProps = new Properties();
        if (configFile != null && commandConfigFile != null) {
            throw new ArgumentParserException("Options --consumer.config and --command-config are mutually exclusive.", parser);
        }
        if (configFile != null) {
            System.out.println("Option --consumer.config has been deprecated and will be removed in a future version. Use --command-config instead.");
            try {
                consumerProps.putAll(Utils.loadProps(configFile));
            } catch (IOException e) {
                throw new ArgumentParserException(e.getMessage(), parser);
            }
        }
        if (commandConfigFile != null) {

Review comment (suggestion):
I suggest adding `(config options shared with command line parameters will be overridden)` to the help string. That's still true.

Code after:
                .dest("resetPolicy")
                .help("Set reset policy (must be either 'earliest', 'latest', or 'none')");

        parser.addArgument("--assignment-strategy")
                .action(store())
                .required(false)
                .setDefault(RangeAssignor.class.getName())
                .type(String.class)
                .dest("assignmentStrategy")
                .help(String.format("Set assignment strategy (e.g. %s); only used if the group protocol is %s", RoundRobinAssignor.class.getName(), GroupProtocol.CLASSIC.name()));

        parser.addArgument("--consumer.config")
                .action(store())
                .required(false)
                .type(String.class)
                .metavar("CONFIG-FILE")
                .help("(DEPRECATED) Consumer config properties file" +
                        "This option will be removed in a future version. Use --command-config instead");

        parser.addArgument("--command-config")
                .action(store())
                .required(false)
                .type(String.class)
                .metavar("CONFIG-FILE")
                .dest("commandConfigFile")
                .help("Config properties file (config options shared with command line parameters will be overridden).");

        return parser;
    }

    public static VerifiableConsumer createFromArgs(ArgumentParser parser, String[] args) throws ArgumentParserException {
        Namespace res = parser.parseArgs(args);

        boolean useAutoCommit = res.getBoolean("useAutoCommit");
        String configFile = res.getString("consumer.config");
        String commandConfigFile = res.getString("commandConfigFile");
        String brokerHostAndPort = res.getString("bootstrapServer");

        Properties consumerProps = new Properties();
        if (configFile != null && commandConfigFile != null) {
            throw new ArgumentParserException("Options --consumer.config and --command-config are mutually exclusive.", parser);
        }
        if (configFile != null) {
            System.out.println("Option --consumer.config has been deprecated and will be removed in a future version. Use --command-config instead.");
            try {
                consumerProps.putAll(Utils.loadProps(configFile));
            } catch (IOException e) {
                throw new ArgumentParserException(e.getMessage(), parser);
            }
        }
        if (commandConfigFile != null) {