private static DiffStrategy fromTag(String tag, boolean allowContents) {
            switch (tag) {
                case "diff.contents":
                    return allowContents ? new DiffStrategy(DiffType.CONTENTS, null) : null;
                case "diff.error.add":
                    return new DiffStrategy(DiffType.ADD, Severity.ERROR);
                case "diff.error.remove":
                    return new DiffStrategy(DiffType.REMOVE, Severity.ERROR);
                case "diff.error.update":
                    return new DiffStrategy(DiffType.UPDATE, Severity.ERROR);
                case "diff.error.const":
                    return new DiffStrategy(DiffType.CONST, Severity.ERROR);
                case "diff.danger.add":
                    return new DiffStrategy(DiffType.ADD, Severity.DANGER);
                case "diff.danger.remove":
                    return new DiffStrategy(DiffType.REMOVE, Severity.DANGER);
                case "diff.danger.update":
                    return new DiffStrategy(DiffType.UPDATE, Severity.DANGER);
                case "diff.danger.const":
                    return new DiffStrategy(DiffType.CONST, Severity.DANGER);
                case "diff.warning.add":
                    return new DiffStrategy(DiffType.ADD, Severity.WARNING);
                case "diff.warning.remove":
                    return new DiffStrategy(DiffType.REMOVE, Severity.WARNING);
                case "diff.warning.update":
                    return new DiffStrategy(DiffType.UPDATE, Severity.WARNING);
                case "diff.warning.const":
                    return new DiffStrategy(DiffType.CONST, Severity.WARNING);
                default:
                    // Skip non-diff tags.
                    return null;
            }
        }
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