static Consumer<ValidationEvent> createStatusUpdater(
            StandardOptions standardOptions,
            ColorFormatter colors,
            CliPrinter stderr,
            AtomicInteger issueCount
    ) {
        // Only show the status if not quiet and the terminal supports ANSI.
        if (standardOptions.quiet() || !colors.isColorEnabled()) {
            return null;
        }

        return event -> {
            if (event.getSeverity() != Severity.SUPPRESSED) {
                int encountered = issueCount.incrementAndGet();
                String line = "Validating model: " + encountered + " issues";
                if (encountered > 1) {
                    line = '\r' + line;
                }
                stderr.append(line);
                stderr.flush();
            }
        };
    }
Loads, builds, and report validation issues with models.
smithy-cli/src/main/java/software/amazon/smithy/cli/commands/ModelBuilder.java