static ValidationEvent emitBadDocComment(SourceLocation location, String comments) {
        String message = "Found documentation comments ('///') attached to nothing. Documentation comments must "
                + "appear on their own lines, directly before shapes and members, and before any traits.";
        if (comments != null) {
            message += " The invalid comments were: " + comments;
        }
        return ValidationEvent.builder()
                .id(BAD_DOCUMENTATION_COMMENT)
                .severity(Severity.WARNING)
                .message(message)
                .sourceLocation(location)
                .build();
    }
Checks if a list of validation events contains an ERROR severity.

@param events Events to check.
@return Returns true if an ERROR event is present.
smithy-model/src/main/java/software/amazon/smithy/model/loader/LoaderUtils.java