@Override
    public List<ValidationEvent> validate(Model model) {
        List<ValidationEvent> events = new ArrayList<>();
        for (MemberShape member : model.getMemberShapes()) {
            if (member.hasTrait(ClientOptionalTrait.ID)) {
                continue;
            }
            if (member.hasTrait(DefaultTrait.ID) && config.onRequiredOrDefault) {
                events.add(danger(member, "@default members must also be marked with the @clientOptional trait"));
            }
            if (member.hasTrait(RequiredTrait.ID)) {
                if (config.onRequiredOrDefault) {
                    events.add(danger(member, "@required members must also be marked with the @clientOptional trait"));
                } else if (config.onRequiredStructureOrUnion && isTargetingStructureOrUnion(model, member)) {
                    events.add(danger(member,
                            "@required members that target a structure or union must be marked with "
                                    + "the @clientOptional trait. Not using the @clientOptional trait here "
                                    + "is risky because there is no backward compatible way to replace the "
                                    + "@required trait with the @default trait if the member ever needs to "
                                    + "be made optional."));
                }
            }
        }
        return events;
    }
Whether clientOptional is required for all members marked as required or default.

@return Returns true if required.
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingClientOptionalTrait.java