▲ | esafak 2 days ago | |
Do you use it in CI? Do you have a template or something to share? | ||
▲ | LennyWhiteJr 2 days ago | parent | next [-] | |
Yeah, it's included as one of the gradle scripts which fails the build in CI if the rules don't pass. 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 2 days ago | parent | prev [-] | |
there's an official template here: https://github.com/detekt/detekt-custom-rule-template/tree/m... and here's the diff for a 'real world' rule I implemented: https://github.com/michaelbull/kotlin-result/compare/master.... |