liquibase-core/src/main/java/liquibase/integration/commandline/Main.java
private void checkForUnexpectedCommandParameter(List<String> messages) {
        if (COMMANDS.UPDATE_COUNT.equalsIgnoreCase(command)
                || COMMANDS.UPDATE_COUNT_SQL.equalsIgnoreCase(command)
                || COMMANDS.UPDATE_TO_TAG.equalsIgnoreCase(command)
                || COMMANDS.UPDATE_TO_TAG_SQL.equalsIgnoreCase(command)
                || COMMANDS.CALCULATE_CHECKSUM.equalsIgnoreCase(command)
                || COMMANDS.DB_DOC.equalsIgnoreCase(command)
                || COMMANDS.TAG.equalsIgnoreCase(command)
                || COMMANDS.TAG_EXISTS.equalsIgnoreCase(command)) {

            if ((!commandParams.isEmpty()) && commandParams.iterator().next().startsWith("-")) {
                messages.add(coreBundle.getString(ERRORMSG_UNEXPECTED_PARAMETERS) + commandParams);
            }
        } else if (COMMANDS.STATUS.equalsIgnoreCase(command)
                || COMMANDS.UNEXPECTED_CHANGESETS.equalsIgnoreCase(command)) {
            if ((!commandParams.isEmpty())
                    && !commandParams.iterator().next().equalsIgnoreCase("--" + OPTIONS.VERBOSE)) {
                messages.add(coreBundle.getString(ERRORMSG_UNEXPECTED_PARAMETERS) + commandParams);
            }
        } else if (COMMANDS.DIFF.equalsIgnoreCase(command)
                || COMMANDS.DIFF_CHANGELOG.equalsIgnoreCase(command)) {
            if ((!commandParams.isEmpty())) {
                for (String cmdParm : commandParams) {
                    if (!cmdParm.startsWith("--" + OPTIONS.REFERENCE_USERNAME)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_PASSWORD)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_DRIVER)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_DEFAULT_CATALOG_NAME)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_DEFAULT_SCHEMA_NAME)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_SCHEMA)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_CATALOG)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_TABLESPACE)
                            && !cmdParm.startsWith("--" + OPTIONS.SCHEMAS)
                            && !cmdParm.startsWith("--" + OPTIONS.OUTPUT_SCHEMAS_AS)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_SCHEMAS)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_URL)
                            && !cmdParm.startsWith("--" + OPTIONS.EXCLUDE_OBJECTS)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_OBJECTS)
                            && !cmdParm.startsWith("--" + OPTIONS.DIFF_TYPES)) {
                        messages.add(String.format(coreBundle.getString("unexpected.command.parameter"), cmdParm));
                    }
                }
            }
        } else if ((COMMANDS.SNAPSHOT.equalsIgnoreCase(command)
                || COMMANDS.GENERATE_CHANGELOG.equalsIgnoreCase(command)
        )
                && (!commandParams.isEmpty())) {
            for (String cmdParm : commandParams) {
                if (!cmdParm.startsWith("--" + OPTIONS.INCLUDE_SCHEMA)
                        && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_CATALOG)
                        && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_TABLESPACE)
                        && !cmdParm.startsWith("--" + OPTIONS.SCHEMAS)) {
                    messages.add(String.format(coreBundle.getString("unexpected.command.parameter"), cmdParm));
                }
            }
        }

    }
private void checkForUnexpectedCommandParameter(List<String> messages) {
        if (COMMANDS.UPDATE_COUNT.equalsIgnoreCase(command)
                || COMMANDS.UPDATE_COUNT_SQL.equalsIgnoreCase(command)
                || COMMANDS.UPDATE_TO_TAG.equalsIgnoreCase(command)
                || COMMANDS.UPDATE_TO_TAG_SQL.equalsIgnoreCase(command)
                || COMMANDS.CALCULATE_CHECKSUM.equalsIgnoreCase(command)
                || COMMANDS.DB_DOC.equalsIgnoreCase(command)
                || COMMANDS.TAG.equalsIgnoreCase(command)
                || COMMANDS.TAG_EXISTS.equalsIgnoreCase(command)) {

            if ((!commandParams.isEmpty()) && commandParams.iterator().next().startsWith("-")) {
                messages.add(coreBundle.getString(ERRORMSG_UNEXPECTED_PARAMETERS) + commandParams);
            }
        } else if (COMMANDS.STATUS.equalsIgnoreCase(command)
                || COMMANDS.UNEXPECTED_CHANGESETS.equalsIgnoreCase(command)) {
            if ((!commandParams.isEmpty())
                    && !commandParams.iterator().next().equalsIgnoreCase("--" + OPTIONS.VERBOSE)) {
                messages.add(coreBundle.getString(ERRORMSG_UNEXPECTED_PARAMETERS) + commandParams);
            }
        } else if (COMMANDS.DIFF.equalsIgnoreCase(command)
                || COMMANDS.DIFF_CHANGELOG.equalsIgnoreCase(command)) {
            if ((!commandParams.isEmpty())) {
                for (String cmdParm : commandParams) {
                    if (!cmdParm.startsWith("--" + OPTIONS.REFERENCE_USERNAME)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_PASSWORD)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_DRIVER)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_DEFAULT_CATALOG_NAME)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_DEFAULT_SCHEMA_NAME)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_SCHEMA)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_CATALOG)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_TABLESPACE)
                            && !cmdParm.startsWith("--" + OPTIONS.SCHEMAS)
                            && !cmdParm.startsWith("--" + OPTIONS.OUTPUT_SCHEMAS_AS)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_SCHEMAS)
                            && !cmdParm.startsWith("--" + OPTIONS.REFERENCE_URL)
                            && !cmdParm.startsWith("--" + OPTIONS.EXCLUDE_OBJECTS)
                            && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_OBJECTS)
                            && !cmdParm.startsWith("--" + OPTIONS.DIFF_TYPES)) {
                        messages.add(String.format(coreBundle.getString("unexpected.command.parameter"), cmdParm));
                    }
                }
            }
        } else if ((COMMANDS.SNAPSHOT.equalsIgnoreCase(command)
                || COMMANDS.GENERATE_CHANGELOG.equalsIgnoreCase(command)
        )
                && (!commandParams.isEmpty())) {
            for (String cmdParm : commandParams) {
                if (!cmdParm.startsWith("--" + OPTIONS.INCLUDE_SCHEMA)
                        && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_CATALOG)
                        && !cmdParm.startsWith("--" + OPTIONS.INCLUDE_TABLESPACE)
                        && !cmdParm.startsWith("--" + OPTIONS.SCHEMAS)) {
                    messages.add(String.format(coreBundle.getString("unexpected.command.parameter"), cmdParm));
                }
            }
        }

    }
Checks for unexpected (unknown) command line parameters and, if any problems are found,
returns the list of issues in String form.

@param messages an array of Strings to which messages for issues found will be added