A type-safe, reflection-free, powerful enumeration implementation for Scala with exhaustive pattern match warnings and helpful integrations.
And for exactly the same reasons one shouldn't override equals and hashCode in a case class, they shouldn't manually implement an enumeration and instead let a well-tested macro (2.x) or the compiler itself (3.x) handle reliably doing the automated code generation. The more code that is generated by the compiler, the smaller the defects, technical debt, and security vulnerability surface areas.
Refinement types for Scala
This is more or less how derivation works when you want to use something like Refined types (it exposes Validate[Type, Refinement] typeclass if I remember correctly). Enumeratum exposes Enum[A], and newtypes expose Coercible[From, To].
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
Scala compiler plugin for static code analysis
I've since figured this out (Scapegoat/FinalModifierOnCaseClass and WartRemover/FinalCaseClass). I plan to add it to the next version of the article.
Help me break the fourth wall
1 project | reddit.com/r/scala | 25 Apr 2022
Opinions on implementing traits for validation with the help of a companion object
2 projects | reddit.com/r/scala | 26 Feb 2022
Scala 3 Reflection
5 projects | reddit.com/r/scala | 1 Feb 2022
3 projects | reddit.com/r/scala | 12 Dec 2021
Best Scala framework / libraries out there ?
4 projects | reddit.com/r/scala | 31 Oct 2021