FYI <@SteliosFran> will be speaking about Konsist ...
# konsist
i
FYI @SteliosFran will be speaking about Konsist at Droidcon SF 🥳 I am eager to see this talk as he and his team have already created an impressive Konsist test suite containing 100+ tests to improve code base quality 😁😁
👍 1
K 2
❤️ 2
s
Thank you for all the hard work you have put so far! We’ll be very happy to spread the word and support the project!
❤️ 4
p
Is it an intention to provide predefined rulesets that can be used by others instead of Copy and Paste them?
Something like (in case of Spring JPA)
Copy code
// Rule
fun KoScope.verifyRepositoryNamingConvention() {
   this.interfaces()
       .withAnnotationOf(Repository::class)
       .assertTrue {
           it.name.endsWith("Repository")
       }
}

// Usage
Konsist.scopeFromProduction().verifyRepositoryNamingConvention()
i
I have this in the backlog and I think this would be helpful, however we need time to focus on other priorities ATM
👍 1
p
It's enough for me at the moment that it is already planned for the future. Until then I can experiment with my solution
i
What direction do you have in mind?
p
Because I want the same basic ruleset for all of my projects using the same application framework (SpringBoot) I want to share them between the projects as test library instead of copy them and maintain them in multiple places.
i
I was thinking about heaving a way to override a project root - this way all of these tests could be extracted to a separate project - WDYT?
p
That means you want to import the whole test suite to be executed in the project, that imports it? I currently only put the rules (as shown in the example above) to an own Gradle project and include it as test scoped dependency in all the Spring Boot projects on test scope.
i
Yes, exactly - although I see this is not ideal
p
That works as long as all the rules are relevant by all projects. As soon as there are exceptions this is leading to problems. My goal is a bit different. I create a ruleset that contains rules relevant for SpringBoot projects but depending on the concrete project only a subset of rules can be used. This makes it flexible. Especially when working with multiple teams that have slightly different requirements/opionions.
i
I agree - I will make a note to think how this cna be achieved
p
I will experiment further and show the results as soon as I reach a stable stage.
👍 1