Hey guys, quick question (I joined a couple of day...
# konsist
j
Hey guys, quick question (I joined a couple of days ago to this channel). I was checking of the test (ArchitecturalLayer) and I ran into the following “issue”:
Copy code
@Test
fun `layers with 3 dots`() {
  Konsist
    .scopeFromProject()
    .assertArchitecture {
      // Define layers
      val services = Layer("Service", "nl.app.service..")
      val repository = Layer("Repository", "nl.app.repository...")
      services.dependsOnNothing()
    }
}
This test passed although the
repository
layer contains 3 dots (…) on his definition. If I add
repository._dependsOnNothing_()
, it throws
com.lemonappdev.konsist.core.exception.KoPreconditionFailedException: Layer Repository doesn't contain any files.
and that’s okay! And another test is, if I only define
repository
alone without the
service
, it also throws the exception which is fine. My question is, should that definition of the 3 dots be caught before running
repository._dependsOnNothing_()
if there is more than 1 layer? Thanks!
n
This is very good point. We will add it to the Backlog, most likely we add this in the next release. Thanks for the feedback 🙂
j
Great! Can I help as well? I wouldn't mind being able to help 🙂
i
Actually we are eager to get more hands on this project. @Jonathan Sarco If you want feel free to implement this and open PR. Konsist projects has to be opened in InteliJ IDEA. Steps are quite straight forward: 1. Add check to Layer class a. Forbid usage of more than two dots (I guess with regex) 2. Add Test to LayerTest class Are you up for the initial challange?
j
Hey Igor! Nice, I have already cloned Konsist on my laptop. I'll grab his task and let you guys know!
i
Amazing 🙂 Let us know if you need any help.
K 1
j
Hey Igor, the PR should be created to the develop branch, right? Just checking the others PRs open and it seems like it's like that...
i
Yes
develop
🤙🏽 1
j
Checked! Also I created another PR into
konsist-documentation
adding the branch
develop
that all the PRs should point to. It might not necessary so it can be discarded the PR as well! I explained in both PRs (
konsist
and
konsist-documentation
) a bit about the PR itself. If I missed something or whatever, just let me know, more than open to change anything! 😬
i
Great. We are still polishing project to ease up open-source contributions. Docs PR was merged. Regarding Konsist PR there are few issues - I have enabled CI checks, so some
apiTests
are failing. Please take a look. https://github.com/LemonAppDev/konsist/actions/runs/6162428556/job/16726814429?pr=504 Other checks seems to require a bit of setup on our side, so I will take a look and try to fix them.
BTW These regex docs are amazing. Great work !🙏🔥
I have fixed the issue with other failing PR checks, so please rebase your changes to
develop
and address the comments.
j
Great! I will! Thanks!
i
Merged. Thank you for the contribution.
j
Amazing! Thank you! If I find something else, I would like to keep contributing. Cheers 😬
❤️ 1