structurizr/java

DSL parser does not seem to handle curly brackets balance

Closed this issue · 0 comments

Description

While using the StructurizrDslParser from "com.structurizr:structurizr-dsl:2.0.0" lib, trying out simple validation made by the parser. I noticed that there are no errors if the "{", "}" of a workspace are not balanced.

The workspace output by the parser is actually valid.

Steps to reproduce

  1. Take the simple workspace dsl example from https://structurizr.com/ (top of the page)
  2. Go to https://structurizr.com/dsl and paste the code there
  3. Remove the last "}" which closes the workspace
  4. Render the dsl
  5. No error in rendering :(

The same can be easily reproduced in a few line of code (I put a screen shot of a failing test written in kotlin where I expected the parser to fail to parse)

Screenshot

image

Code sample

No response

Configuration

No response

Severity

Minor

Priority

I have no budget and there's no rush, please fix this for free

More information

No response