@Override
    public List<ValidationEvent> evaluate(Differences differences) {
        // Map of trait shape ID to diff strategies to evaluate.
        Map<ShapeId, List<DiffStrategy>> strategies = computeDiffStrategies(differences.getNewModel());
        List<ValidationEvent> events = new ArrayList<>();

        differences.changedShapes().forEach(changedShape -> {
            changedShape.getTraitDifferences().forEach((traitId, oldTraitNewTraitPair) -> {
                Trait oldTrait = oldTraitNewTraitPair.left;
                Trait newTrait = oldTraitNewTraitPair.right;
                // Do not emit for the box trait because it is added and removed for backward compatibility.
                if (!IGNORED_TRAITS.contains(traitId)) {
                    // If we don't know about the trait, warn on any change to it.
                    List<DiffStrategy> diffStrategies = strategies.computeIfAbsent(traitId,
                            t -> ListUtils.of(new DiffStrategy(DiffType.CONST, Severity.WARNING)));

                    for (DiffStrategy strategy : diffStrategies) {
                        List<ValidationEvent> diffEvents = strategy.diffType.validate(
                                differences.getNewModel(),
                                "",
                                changedShape.getNewShape(),
                                traitId,
                                oldTrait == null ? null : oldTrait.toNode(),
                                newTrait == null ? null : newTrait.toNode(),
                                strategy.severity);
                        events.addAll(diffEvents);
                    }
                }
            });
        });

        return events;
    }
Traits in this list have special backward compatibility rules and can't be validated here.
smithy-diff/src/main/java/software/amazon/smithy/diff/evaluators/ModifiedTrait.java