I love Detekt! It's particularly good for enforcing project conventions that can't be covered with standard linters. With access to the full AST, you can basically enforce any kind of rule you want with custom analyzers. And LLMs take out 90% of the effort for creating new analyzers.
esafak|7 months ago
LennyWhiteJr|7 months ago
No template, as it's specific to my team's project, but one example is that we enforce that classes within our core domain don't import types from outside the project. You could accomplish this with separate projects, but that comes with its own complexities. This rule basically says "any domain type shall not import a non-domain type".
rileymichael|7 months ago
and here's the diff for a 'real world' rule I implemented: https://github.com/michaelbull/kotlin-result/compare/master....