Add some way of putting attributes on different classes/enums and run custom functions for validation on compile time.
E.g.
A custom NoDublicatesAttribute could be added to enums to prevent multiple in the enum.
A custom NoImplicitValuesAttribute could be added to enums to only allow explicit value assignment the enum.
These are examples of what analyzers can do.
Most helpful comment
These are examples of what analyzers can do.